1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-discord.git synced 2025-01-09 20:46:49 +00:00

Fixed unknown mentions being colored black

This commit is contained in:
diamondburned 2020-07-13 18:28:18 -07:00
parent b8c92a56d8
commit bb2430a4a5

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()