Skip to content

ChannelAdBreakBeginMessage

The message received by the ChannelAdBreakBegin event.

Extends

Type parameters

Type parameterValue
K extends ConnectionTypesConnectionTypes

Constructors

new ChannelAdBreakBeginMessage()

1
new ChannelAdBreakBeginMessage<K>(
2
connection: K,
3
subscription: SubscriptionType<ChannelAdBreakBegin, K>,
4
data: ChannelAdBreakBeginEvent): ChannelAdBreakBeginMessage<K>

Builds up a ChannelAdBreakBegin message.

Parameters

ParameterTypeDescription
connectionKThe EventSub connection used.
subscriptionSubscriptionType<ChannelAdBreakBegin, K>The subscription which trigger this message.
dataChannelAdBreakBeginEventThe event data received with the subscription.

Returns

ChannelAdBreakBeginMessage<K>

Overrides

BaseSubscriptionMessage.constructor

Source

twitchfy/packages/eventsub/src/structures/messages/ChannelAdBreakBegin/ChannelAdBreakBeginMessage.ts:40

Properties

PropertyModifierTypeDescriptionInherited from
broadcasterreadonlyBaseUser<ChannelAdBreakBegin, K>The broadcaster of the channel where the ad was begun.-
connectionreadonlyKThe EventSub connection used.BaseSubscriptionMessage.connection
durationreadonlynumberThe duration in seconds of the ad break.-
isAutomaticreadonlybooleanWhether the ad break was automatically triggered or was manually triggered by the broadcaster.-
requesterreadonlyBaseUser<ChannelAdBreakBegin, K>The user who requested the ad break. If the ad break was automatically triggered, this field is the broadcaster.-
startedAtreadonlyDateThe Date object of when the ad break started.-
subscriptionreadonlySubscriptionType<ChannelAdBreakBegin, K>The subscription which trigger this message.BaseSubscriptionMessage.subscription

Methods

checkMessageType()

1
checkMessageType<U>(type: U): this is SubscriptionMessages<K>[U]

Checks whether the message is of a certain type.

Type parameters

Type parameterValue
U extends SubscriptionTypesSubscriptionTypes

Parameters

ParameterTypeDescription
typeUThe type to check.

Returns

this is SubscriptionMessages<K>[U]

Whether the message is of the type.

Inherited from

BaseSubscriptionMessage.checkMessageType

Source

twitchfy/packages/eventsub/src/structures/messages/BaseSubscriptionMessage.ts:24