Compare commits

..

No commits in common. "0e4a963bc7a0980e1bc2827e3d4ce3591f590b59" and "46db72b2ccc11d077e0ad406ee6e9dc2184c9fdd" have entirely different histories.

3 changed files with 2 additions and 13 deletions

View file

@ -2,17 +2,6 @@
title: "Available Events" title: "Available Events"
--- ---
## `adbreak_begin`
Ad-break has begun and ads are playing now in mentioned channel.
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?
- `started_at` - When did the ad-break start
## `ban` ## `ban`
Moderator action caused a user to be banned from chat. Moderator action caused a user to be banned from chat.

View file

@ -60,7 +60,7 @@ type (
// EventSubEventAdBreakBegin contains the payload for an AdBreak event // EventSubEventAdBreakBegin contains the payload for an AdBreak event
EventSubEventAdBreakBegin struct { EventSubEventAdBreakBegin struct {
Duration int64 `json:"duration_seconds"` Duration int64 `json:"duration_seconds"`
StartedAt time.Time `json:"started_at"` Timestamp time.Time `json:"timestamp"`
IsAutomatic bool `json:"is_automatic"` IsAutomatic bool `json:"is_automatic"`
BroadcasterUserID string `json:"broadcaster_user_id"` BroadcasterUserID string `json:"broadcaster_user_id"`
BroadcasterUserLogin string `json:"broadcaster_user_login"` BroadcasterUserLogin string `json:"broadcaster_user_login"`

View file

@ -245,7 +245,7 @@ func (*twitchWatcher) handleEventSubChannelAdBreakBegin(m json.RawMessage) error
"channel": "#" + payload.BroadcasterUserLogin, "channel": "#" + payload.BroadcasterUserLogin,
"duration": payload.Duration, "duration": payload.Duration,
"is_automatic": payload.IsAutomatic, "is_automatic": payload.IsAutomatic,
"started_at": payload.StartedAt, "timestamp": payload.Timestamp,
}) })
log.WithFields(log.Fields(fields.Data())).Info("Ad-Break started") log.WithFields(log.Fields(fields.Data())).Info("Ad-Break started")