feat(cmd/say): link to said message
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
9b4050696e
commit
ba70c61bc4
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,7 @@ pub async fn say(
|
||||||
#[description = "the message content"] content: String,
|
#[description = "the message content"] content: String,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
let channel = ctx.channel_id();
|
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?;
|
ctx.say("I said what you said!").await?;
|
||||||
|
|
||||||
if let Some(channel_id) = ctx.data().config.discord.channels.log_channel_id {
|
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()
|
let embed = CreateEmbed::default()
|
||||||
.title("Say command used!")
|
.title("Say command used!")
|
||||||
.description(content)
|
.description(format!(
|
||||||
|
"{}\n\n[Jump to message]({})",
|
||||||
|
content,
|
||||||
|
message.link()
|
||||||
|
))
|
||||||
.author(author);
|
.author(author);
|
||||||
|
|
||||||
let message = CreateMessage::new().embed(embed);
|
let message = CreateMessage::new().embed(embed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue