1
0
forked from lug/matterbridge

Fancy replies using rich embeds on Discord side

This commit is contained in:
2025-11-03 15:17:34 -08:00
parent 186d28858b
commit f73bee90ab
17 changed files with 1706 additions and 128 deletions

View File

@@ -152,3 +152,11 @@ func (u *User) DefaultAvatarIndex() int {
id, _ := strconv.Atoi(u.Discriminator)
return id % 5
}
// DisplayName returns the user's global name if they have one, otherwise it returns their username.
func (u *User) DisplayName() string {
if u.GlobalName != "" {
return u.GlobalName
}
return u.Username
}