From ba70c61bc4a5ffa709630dc442722de63863c1a4 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 30 Apr 2024 23:20:28 +0200 Subject: [PATCH] feat(cmd/say): link to said message Signed-off-by: Sefa Eyeoglu --- src/commands/general/say.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commands/general/say.rs b/src/commands/general/say.rs index b873afd..a48db86 100644 --- a/src/commands/general/say.rs +++ b/src/commands/general/say.rs @@ -16,7 +16,7 @@ pub async fn say( #[description = "the message content"] content: String, ) -> Result<(), Error> { let channel = ctx.channel_id(); - channel.say(ctx, &content).await?; + let message = channel.say(ctx, &content).await?; ctx.say("I said what you said!").await?; if let Some(channel_id) = ctx.data().config.discord.channels.log_channel_id { @@ -24,7 +24,11 @@ pub async fn say( let embed = CreateEmbed::default() .title("Say command used!") - .description(content) + .description(format!( + "{}\n\n[Jump to message]({})", + content, + message.link() + )) .author(author); let message = CreateMessage::new().embed(embed);