diff --git a/src/commands/account.rs b/src/commands/account.rs index f6d6fd3..979ab35 100644 --- a/src/commands/account.rs +++ b/src/commands/account.rs @@ -12,6 +12,7 @@ pub(crate) async fn account(_ctx: Context<'_>) -> Result<(), Error> { #[poise::command(slash_command)] pub(crate) async fn add(ctx: Context<'_>, ign: String) -> Result<(), Error> { + ctx.defer_ephemeral().await?; let pool = ctx.data().sqlite_pool.clone(); let minecraft_uuid = minecraft_uuid_for_username(ign.clone()).await?; let hypixel_linked_discord = linked_discord_for_uuid( @@ -49,6 +50,7 @@ pub(crate) async fn remove(ctx: Context<'_>) -> Result<(), Error> { #[poise::command(slash_command)] pub(crate) async fn list(ctx: Context<'_>, user: Option) -> Result<(), Error> { + ctx.defer_ephemeral().await?; let user_id = user.clone().map(|user| user.id.get()); let user_name = user.clone().map(|user| user.name); let author_name = ctx.author().name.clone(); diff --git a/src/commands/bots.rs b/src/commands/bots.rs index b245985..14fda88 100644 --- a/src/commands/bots.rs +++ b/src/commands/bots.rs @@ -10,6 +10,7 @@ pub(crate) async fn bots( #[description = "default: 0"] bots: u8, ) -> Result<(), Error> { + ctx.defer_ephemeral().await?; *ctx.data().bots.write().await = bots; let reply = format!("{} bots are now registered as available", bots).to_string(); command_helper::send_simple(ctx, reply).await diff --git a/src/commands/helpstart.rs b/src/commands/helpstart.rs index 2911c9f..b81d396 100644 --- a/src/commands/helpstart.rs +++ b/src/commands/helpstart.rs @@ -13,6 +13,7 @@ pub(crate) async fn helpstart( #[rename = "current"] current_players: u8, ) -> Result<(), Error> { + ctx.defer_ephemeral().await?; let needed_players = 4 - current_players; let bots = *ctx.data().bots.read().await; diff --git a/src/commands/lfg.rs b/src/commands/lfg.rs index 2922fe4..8d3a2cb 100644 --- a/src/commands/lfg.rs +++ b/src/commands/lfg.rs @@ -72,6 +72,7 @@ pub(crate) async fn lfg( #[rename = "message"] note: Option, ) -> Result<(), Error> { + ctx.defer_ephemeral().await?; let mut reply: CreateReply = CreateReply::default(); let guild_id = ctx.guild_id().unwrap().get(); reply = match cooldown(&ctx, 600, 300) { diff --git a/src/commands/xd.rs b/src/commands/xd.rs index 68c80f4..a6ece93 100644 --- a/src/commands/xd.rs +++ b/src/commands/xd.rs @@ -4,6 +4,7 @@ const XD:&str = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ #[poise::command(slash_command)] pub(crate) async fn xd(ctx: Context<'_>) -> Result<(), Error> { + ctx.defer_ephemeral().await?; ctx.say(XD).await?; Ok(()) }