Skip to content

Commit

Permalink
feat: remove /modmail_setup command
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
melothemarten committed Jul 25, 2024
1 parent f72dbd5 commit 74ba7ab
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/commands/modmail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 74ba7ab

Please sign in to comment.