Fixed unknown mentions being colored black

This commit is contained in:
diamondburned 2020-07-13 18:28:18 -07:00
parent b8c92a56d8
commit bb2430a4a5
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ func (m MentionSegment) Color() uint32 {
return blurple
}
return discord.MemberColor(*g, *m.GuildUser.Member).Uint32()
if color := discord.MemberColor(*g, *m.GuildUser.Member); color > 0 {
return color.Uint32()
}
case m.GuildRole != nil && m.GuildRole.Color > 0:
return m.GuildRole.Color.Uint32()