From 74ba7ab42e02237c7ca7a8c751b1bccc62253f8c Mon Sep 17 00:00:00 2001 From: Ivan Dardi Date: Wed, 24 Jul 2024 21:57:41 -0300 Subject: [PATCH] feat: remove /modmail_setup command It doesn't work as intended since if you delete the modmail message, the previous deleted message ID is still stored in the data struct, and so the command thinks it's still valid and does nothing. The way to setup the modmail message it is to delete the modmail message and restart the bot, because it automatically configures the modmail on startup. --- src/commands/modmail.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/commands/modmail.rs b/src/commands/modmail.rs index 292d74c..80411ae 100644 --- a/src/commands/modmail.rs +++ b/src/commands/modmail.rs @@ -88,19 +88,6 @@ pub async fn modmail( Ok(()) } -#[poise::command( - prefix_command, - slash_command, - ephemeral, - category = "Modmail", - hide_in_help, - check = "crate::checks::check_is_moderator" -)] -pub async fn modmail_setup(ctx: Context<'_>) -> Result<(), Error> { - load_or_create_modmail_message(ctx, ctx.data()).await?; - Ok(()) -} - pub async fn load_or_create_modmail_message( http: impl serenity::CacheHttp, data: &Data,