WebhookSubscriptionCallbackManager
The Webhook Subscription Callback Manager.
Type parameters
| Type parameter |
|---|
T extends SubscriptionTypes |
Constructors
new WebhookSubscriptionCallbackManager()
1new WebhookSubscriptionCallbackManager<T>(connection: WebhookConnection): WebhookSubscriptionCallbackManager<T>Builds up a new WebhookSubscriptionCallbackManager.
Parameters
| Parameter | Type | Description |
|---|---|---|
connection | WebhookConnection | The connection used for this subscription. |
Returns
WebhookSubscriptionCallbackManager<T>
Source
twitchfy/packages/eventsub/src/webhook/structures/WebhookSubscriptionCallbackManager.ts:30
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
connection | readonly | WebhookConnection | The connection used for this subscription. |
Methods
add()
1add(callback: WebhookSubscriptionCallback<T>): thisAdds a new callback to the subscription. This callback will be executed when a message within this subscription is received.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | WebhookSubscriptionCallback<T> | The callback to add. |
Returns
this
The manager.
Source
twitchfy/packages/eventsub/src/webhook/structures/WebhookSubscriptionCallbackManager.ts:42
execute()
1execute(message: SubscriptionMessages<ConnectionTypes>[T]): Promise<void>Executes all the callbacks of the subscription.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | SubscriptionMessages<ConnectionTypes>[T] | The message to execute the callbacks with. |
Returns
Promise<void>
Source
twitchfy/packages/eventsub/src/webhook/structures/WebhookSubscriptionCallbackManager.ts:55