Skip to content

WebhookSubscriptionCallbackManager

The Webhook Subscription Callback Manager.

Type parameters

Type parameter
T extends SubscriptionTypes

Constructors

new WebhookSubscriptionCallbackManager()

1
new WebhookSubscriptionCallbackManager<T>(connection: WebhookConnection): WebhookSubscriptionCallbackManager<T>

Builds up a new WebhookSubscriptionCallbackManager.

Parameters

ParameterTypeDescription
connectionWebhookConnectionThe connection used for this subscription.

Returns

WebhookSubscriptionCallbackManager<T>

Source

twitchfy/packages/eventsub/src/webhook/structures/WebhookSubscriptionCallbackManager.ts:30

Properties

PropertyModifierTypeDescription
connectionreadonlyWebhookConnectionThe connection used for this subscription.

Methods

add()

1
add(callback: WebhookSubscriptionCallback<T>): this

Adds a new callback to the subscription. This callback will be executed when a message within this subscription is received.

Parameters

ParameterTypeDescription
callbackWebhookSubscriptionCallback<T>The callback to add.

Returns

this

The manager.

Source

twitchfy/packages/eventsub/src/webhook/structures/WebhookSubscriptionCallbackManager.ts:42


execute()

1
execute(message: SubscriptionMessages<ConnectionTypes>[T]): Promise<void>

Executes all the callbacks of the subscription.

Parameters

ParameterTypeDescription
messageSubscriptionMessages<ConnectionTypes>[T]The message to execute the callbacks with.

Returns

Promise<void>

Source

twitchfy/packages/eventsub/src/webhook/structures/WebhookSubscriptionCallbackManager.ts:55