From 95ed52d88f596e2531a054a723ec82fb0652f3cb Mon Sep 17 00:00:00 2001 From: Valentine Briese Date: Mon, 15 Apr 2024 19:25:38 -0700 Subject: [PATCH] Use user's display name when possible for #portside --- src/portside.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/portside.rs b/src/portside.rs index 5befcac..828331d 100644 --- a/src/portside.rs +++ b/src/portside.rs @@ -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))