diff --git a/src/badgey/commands/moderation.rs b/src/badgey/commands/moderation.rs index a6064cc..01ccb13 100644 --- a/src/badgey/commands/moderation.rs +++ b/src/badgey/commands/moderation.rs @@ -76,6 +76,14 @@ async fn unignore_channel_for_xp(ctx: ManifoldContext<'_>, channel: serenity::Ch Ok(()) } -pub fn commands() -> [poise::Command; 9] { - [void_user(), unvoid_user(), airlock_user(), record_chronicle(), security_record(), add_quarantine_channel(), remove_quarantine_channel(), ignore_channel_for_xp(), unignore_channel_for_xp()] +#[poise::command(slash_command, prefix_command, required_permissions = "ADMINISTRATOR")] +async fn send_message(ctx: ManifoldContext<'_>, channel: serenity::ChannelId, message: String) -> ManifoldResult<()> { + + channel.say(&ctx, message).await?; + ctx.reply(format!("Sent message to channel <#{channel}>", channel=channel)).await?; + Ok(()) +} + +pub fn commands() -> [poise::Command; 10] { + [void_user(), unvoid_user(), airlock_user(), record_chronicle(), security_record(), add_quarantine_channel(), remove_quarantine_channel(), ignore_channel_for_xp(), unignore_channel_for_xp(), send_message()] }