mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 20:01:17 +00:00
[core] Make number of subscribed months available for subgift
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9e2628c6e3
commit
c0545d1d87
2 changed files with 9 additions and 7 deletions
15
irc.go
15
irc.go
|
@ -464,13 +464,14 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
|
|||
|
||||
case "subgift", "anonsubgift":
|
||||
evtData.SetFromData(map[string]interface{}{
|
||||
"from": m.Tags["login"],
|
||||
"gifted_months": i.tagToNumeric(m, "msg-param-gift-months", 1),
|
||||
"multi_month": i.tagToNumeric(m, "msg-param-multimonth-duration", 0),
|
||||
"origin_id": m.Tags["msg-param-origin-id"],
|
||||
"plan": m.Tags["msg-param-sub-plan"],
|
||||
"to": m.Tags["msg-param-recipient-user-name"],
|
||||
"total_gifted": i.tagToNumeric(m, "msg-param-sender-count", 0),
|
||||
"from": m.Tags["login"],
|
||||
"gifted_months": i.tagToNumeric(m, "msg-param-gift-months", 1),
|
||||
"multi_month": i.tagToNumeric(m, "msg-param-multimonth-duration", 0),
|
||||
"origin_id": m.Tags["msg-param-origin-id"],
|
||||
"plan": m.Tags["msg-param-sub-plan"],
|
||||
"subscribed_months": i.tagToNumeric(m, "msg-param-months", 0),
|
||||
"to": m.Tags["msg-param-recipient-user-name"],
|
||||
"total_gifted": i.tagToNumeric(m, "msg-param-sender-count", 0),
|
||||
})
|
||||
log.WithFields(log.Fields(evtData.Data())).Info("User gifted a sub")
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ Fields:
|
|||
- `gifted_months` - Number of months the user gifted
|
||||
- `origin_id` - ID unique to the gift-event (can be used to match `subgift` events to corresponding `submysterygift` event)
|
||||
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
|
||||
- `subscribed_months` - How long the recipient has been subscribed
|
||||
- `to` - The user who received the sub
|
||||
- `username` - The login-name of the user who gifted the subscription
|
||||
|
||||
|
|
Loading…
Reference in a new issue