mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 16:50:01 +00:00
Fix: Message may be nil with new events
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
0984aeb60b
commit
57211b6184
1 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,10 @@ type BadgeCollection map[string]*int
|
||||||
func ParseBadgeLevels(m *irc.Message) BadgeCollection {
|
func ParseBadgeLevels(m *irc.Message) BadgeCollection {
|
||||||
out := BadgeCollection{}
|
out := BadgeCollection{}
|
||||||
|
|
||||||
|
if m == nil {
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
badgeString, ok := m.GetTag("badges")
|
badgeString, ok := m.GetTag("badges")
|
||||||
if !ok || len(badgeString) == 0 {
|
if !ok || len(badgeString) == 0 {
|
||||||
return out
|
return out
|
||||||
|
|
Loading…
Reference in a new issue