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:
parent
b8c92a56d8
commit
bb2430a4a5
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue