Use display name

The documentation misled me a bit...
This commit is contained in:
Noi 2023-09-10 13:55:57 -07:00
parent 4ed5640bc1
commit f310dc72ca

View file

@ -67,10 +67,11 @@ public class CommandsBase : InteractionModuleBase<ShardedInteractionContext> {
}
if (user.DiscriminatorValue == 0) {
var username = escapeFormattingCharacters(user.GlobalName ?? user.Username);
if (user.Nickname != null) {
return $"**{escapeFormattingCharacters(user.Nickname)}** ({escapeFormattingCharacters(user.ToString())})";
return $"**{escapeFormattingCharacters(user.Nickname)}** ({username})";
}
return escapeFormattingCharacters(user.ToString());
return username;
} else {
var username = escapeFormattingCharacters(user.Username);
if (user.Nickname != null) {