TwurpleAuthenticationGetting dataExamplesFAQMigration

Classes

EventSubChannelAdBreakBeginEventEventSubChannelBanEventEventSubChannelCharityAmountEventSubChannelCharityCampaignProgressEventEventSubChannelCharityCampaignStartEventEventSubChannelCharityCampaignStopEventEventSubChannelCharityDonationEventEventSubChannelChatClearEventEventSubChannelChatClearUserMessagesEventEventSubChannelChatMessageDeleteEventEventSubChannelChatMessageEventEventSubChannelChatSettingsUpdateEventEventSubChannelCheerEventEventSubChannelFollowEventEventSubChannelGoalBeginEventEventSubChannelGoalEndEventEventSubChannelGoalProgressEventEventSubChannelHypeTrainBeginEventEventSubChannelHypeTrainContributionEventSubChannelHypeTrainEndEventEventSubChannelHypeTrainProgressEventEventSubChannelModeratorEventEventSubChannelPollBeginChoiceEventSubChannelPollBeginEventEventSubChannelPollChoiceEventSubChannelPollEndEventEventSubChannelPollProgressEventEventSubChannelPredictionBeginEventEventSubChannelPredictionBeginOutcomeEventSubChannelPredictionEndEventEventSubChannelPredictionLockEventEventSubChannelPredictionOutcomeEventSubChannelPredictionPredictorEventSubChannelPredictionProgressEventEventSubChannelRaidEventEventSubChannelRedemptionAddEventEventSubChannelRedemptionUpdateEventEventSubChannelRewardEventEventSubChannelShieldModeBeginEventEventSubChannelShieldModeEndEventEventSubChannelShoutoutCreateEventEventSubChannelShoutoutReceiveEventEventSubChannelSubscriptionEndEventEventSubChannelSubscriptionEventEventSubChannelSubscriptionGiftEventEventSubChannelSubscriptionMessageEventEventSubChannelUnbanEventEventSubChannelUpdateEventEventSubDropEntitlementGrantEventEventSubExtensionBitsTransactionCreateEventEventSubStreamOfflineEventEventSubStreamOnlineEventEventSubSubscriptionEventSubUserAuthorizationGrantEventEventSubUserAuthorizationRevokeEventEventSubUserUpdateEvent

EventSubSubscription<T>

A subscription to an EventSub event.

Overview

Properties

authUserId

Type: string | null

The user ID the subscription is supposed to be authenticated as.

Is only null for subscriptions that don't relate to a user, like extension transactions or user authorizations.

verified

Type: boolean

Whether the subscription has been verified by Twitch.

Methods

getCliTestCommand()

async

Outputs the base command to execute for testing the subscription using the Twitch CLI.

Some additional parameters, like the target user, may be required.

Return type: string

start(resumeFrom)

Activates the subscription.

You don't have to call this method manually after subscribing, as it's done automatically. It's only used to reactivate a subscription after calling .stop().

ParameterTypeRequiredDefaultDescription
resumeFromHelixEventSubSubscriptionnone

The subscription data from Twitch to check whether the subscription needs to be re-added.

Return type: void

stop()

Deactivates the subscription and removes it from the listener.

Return type: void

suspend()

Suspends the subscription, not removing it from the listener.

Return type: void