fix(bot): display new Discord usernames correctly

This commit is contained in:
Iris System
2023-06-28 13:55:21 +12:00
parent 11d70666d0
commit a0fa03599b
3 changed files with 3 additions and 2 deletions

View File

@@ -386,7 +386,7 @@ public class ProxyService
content.Append($"*[(click to see attachment)]({jumpLink})*");
}
var username = nickname ?? repliedTo.Author.Username;
var username = nickname ?? repliedTo.Author.GlobalName ?? repliedTo.Author.Username;
var avatarUrl = avatar != null
? $"https://cdn.discordapp.com/guilds/{trigger.GuildId}/users/{repliedTo.Author.Id}/avatars/{avatar}.png"
: $"https://cdn.discordapp.com/avatars/{repliedTo.Author.Id}/{repliedTo.Author.Avatar}.png";