From 71340f9db16d87684f2beba1e7e0efd912881808 Mon Sep 17 00:00:00 2001 From: Xyon Date: Sun, 5 Oct 2025 12:22:04 +0100 Subject: [PATCH] Add quick and dirty command to allow admins to make the bot say stuff --- src/badgey/commands/moderation.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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()] } -- 2.30.2