mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 00:21:16 +00:00
[core] Fix: Raid viewercount should be numeric, not string
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6f16666940
commit
8cfd22c916
1 changed files with 2 additions and 1 deletions
3
irc.go
3
irc.go
|
@ -392,11 +392,12 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
|
|||
go handleMessage(i.c, m, eventTypeGiftPaidUpgrade, evtData)
|
||||
|
||||
case "raid":
|
||||
vc, _ := strconv.ParseInt(string(m.Tags["msg-param-viewerCount"]), 10, 64)
|
||||
evtData := plugins.FieldCollectionFromData(map[string]interface{}{
|
||||
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
||||
"from": m.Tags["login"],
|
||||
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
|
||||
"viewercount": m.Tags["msg-param-viewerCount"],
|
||||
"viewercount": vc,
|
||||
})
|
||||
log.WithFields(log.Fields(evtData.Data())).Info("Incoming raid")
|
||||
|
||||
|
|
Loading…
Reference in a new issue