aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/commands/utilities.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/commands/utilities.rs b/src/commands/utilities.rs
index 25d4bcf..7679b14 100644
--- a/src/commands/utilities.rs
+++ b/src/commands/utilities.rs
@@ -976,13 +976,21 @@ pub async fn message_download(ctx: Context<'_>, message: serenity::Message) -> R
976/// Echo text to channel 976/// Echo text to channel
977#[poise::command(slash_command)] 977#[poise::command(slash_command)]
978pub async fn say(ctx: Context<'_>, #[description = "Message to send"] text: String) -> Result<()> { 978pub async fn say(ctx: Context<'_>, #[description = "Message to send"] text: String) -> Result<()> {
979 ctx.say(&text).await?; 979 // Acknowledge the interaction with an invisible ephemeral reply, delete it,
980 ctx.send( 980 // then post the actual text as a normal channel message (not a reply to the
981 poise::CreateReply::default() 981 // command invocation).
982 .content("\u{200b}") 982 let ack = ctx
983 .ephemeral(true), 983 .send(
984 ) 984 poise::CreateReply::default()
985 .await?; 985 .content("\u{200b}")
986 .ephemeral(true),
987 )
988 .await?;
989 ack.delete(ctx).await?;
990
991 ctx.channel_id()
992 .say(ctx.serenity_context(), &text)
993 .await?;
986 Ok(()) 994 Ok(())
987} 995}
988 996