mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-09-19 10:02:55 +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
@ -19,6 +19,10 @@ type BadgeCollection map[string]*int
|
||||
func ParseBadgeLevels(m *irc.Message) BadgeCollection {
|
||||
out := BadgeCollection{}
|
||||
|
||||
if m == nil {
|
||||
return out
|
||||
}
|
||||
|
||||
badgeString, ok := m.GetTag("badges")
|
||||
if !ok || len(badgeString) == 0 {
|
||||
return out
|
||||
|
Loading…
Reference in New Issue
Block a user