Skip to content

Commit

Permalink
Add "Jump to Message" link in #portside embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinegb committed Apr 16, 2024
1 parent ad7c2c1 commit 37e3e20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/portside.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub(super) async fn check_portside_reactions(
if reaction.emoji.unicode_eq("🍅") {
let reaction_message = reaction.message(&ctx).await?;
let reaction_message_id = reaction.message_id.to_string();
let reaction_message_link = reaction_message.link();
let tomato_reaction = reaction_message
.reactions
.into_iter()
Expand Down Expand Up @@ -84,6 +85,11 @@ pub(super) async fn check_portside_reactions(
.icon_url(reaction_message.author.face()),
)
.description(reaction_message.content)
.field(
"",
format!("[Jump to Message]({reaction_message_link})"),
false,
)
.footer(CreateEmbedFooter::new(reaction_message_id))
.timestamp(reaction_message.timestamp),
),
Expand Down

0 comments on commit 37e3e20

Please sign in to comment.