Skip to content

Commit

Permalink
Use user's display name when possible for #portside
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinegb committed Apr 16, 2024
1 parent 9c6e6e8 commit 95ed52d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/portside.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,14 @@ pub(super) async fn check_portside_reactions(
CreateEmbed::new()
.color(Color::RED)
.author(
CreateEmbedAuthor::new(&reaction_message.author.name).icon_url(
reaction_message.author.avatar_url().unwrap_or(
reaction_message.author.default_avatar_url(),
),
),
CreateEmbedAuthor::new(
reaction_message
.author
.global_name
.as_ref()
.unwrap_or(&reaction_message.author.name),
)
.icon_url(reaction_message.author.face()),
)
.description(reaction_message.content)
.footer(CreateEmbedFooter::new(reaction_message_id))
Expand Down

0 comments on commit 95ed52d

Please sign in to comment.