mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 08:40:01 +00:00
[eventsub] Update field naming for ad-break, use V1 event
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
300d28c46c
commit
091dac235b
2 changed files with 4 additions and 2 deletions
|
@ -51,13 +51,15 @@ type (
|
|||
}
|
||||
|
||||
EventSubEventAdBreakBegin struct {
|
||||
Duration int64 `json:"duration"`
|
||||
Duration int64 `json:"duration_seconds"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
IsAutomatic bool `json:"is_automatic"`
|
||||
BroadcasterUserID string `json:"broadcaster_user_id"`
|
||||
BroadcasterUserLogin string `json:"broadcaster_user_login"`
|
||||
BroadcasterUserName string `json:"broadcaster_user_name"`
|
||||
RequesterUserID string `json:"requester_user_id"`
|
||||
RequesterUserLogin string `json:"requester_user_login"`
|
||||
RequesterUserName string `json:"requester_user_name"`
|
||||
}
|
||||
|
||||
EventSubEventChannelPointCustomRewardRedemptionAdd struct {
|
||||
|
|
|
@ -114,7 +114,7 @@ func (t *twitchWatcher) getTopicRegistrations(userID string) []topicRegistration
|
|||
return []topicRegistration{
|
||||
{
|
||||
Topic: twitch.EventSubEventTypeChannelAdBreakBegin,
|
||||
Version: twitch.EventSubTopicVersionBeta,
|
||||
Version: twitch.EventSubTopicVersion1,
|
||||
Condition: twitch.EventSubCondition{BroadcasterUserID: userID},
|
||||
RequiredScopes: []string{twitch.ScopeChannelReadAds},
|
||||
Hook: t.handleEventSubChannelAdBreakBegin,
|
||||
|
|
Loading…
Reference in a new issue