mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
[eventsub] Fix: Twitch renamed field in adbreak_begin
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3f376cb2ce
commit
0e4a963bc7
3 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ Fields:
|
|||
- `channel` - The channel the event occurred in
|
||||
- `duration` - Duration of the ads in seconds
|
||||
- `is_automatic` - Were the ads started by the ad-manager?
|
||||
- `timestamp` - When did the ad-break start
|
||||
- `started_at` - When did the ad-break start
|
||||
|
||||
## `ban`
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ type (
|
|||
// EventSubEventAdBreakBegin contains the payload for an AdBreak event
|
||||
EventSubEventAdBreakBegin struct {
|
||||
Duration int64 `json:"duration_seconds"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
StartedAt time.Time `json:"started_at"`
|
||||
IsAutomatic bool `json:"is_automatic"`
|
||||
BroadcasterUserID string `json:"broadcaster_user_id"`
|
||||
BroadcasterUserLogin string `json:"broadcaster_user_login"`
|
||||
|
|
|
@ -245,7 +245,7 @@ func (*twitchWatcher) handleEventSubChannelAdBreakBegin(m json.RawMessage) error
|
|||
"channel": "#" + payload.BroadcasterUserLogin,
|
||||
"duration": payload.Duration,
|
||||
"is_automatic": payload.IsAutomatic,
|
||||
"timestamp": payload.Timestamp,
|
||||
"started_at": payload.StartedAt,
|
||||
})
|
||||
|
||||
log.WithFields(log.Fields(fields.Data())).Info("Ad-Break started")
|
||||
|
|
Loading…
Reference in a new issue