Skip to content

ConduitSubscriptionCallbackManager

The callback manager for a ConduitSubscription.

Type parameters

Type parameter
T extends SubscriptionTypes

Constructors

new ConduitSubscriptionCallbackManager()

1
new ConduitSubscriptionCallbackManager<T>(conduit: Conduit): ConduitSubscriptionCallbackManager<T>

Parameters

ParameterType
conduitConduit

Returns

ConduitSubscriptionCallbackManager<T>

Source

twitchfy/packages/eventsub/src/structures/ConduitSubscriptionCallbackManager.ts:21

Properties

PropertyModifierTypeDescription
conduitreadonlyConduitThe Conduit that created this manager.

Methods

add()

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

Adds a callback to the manager.

Parameters

ParameterTypeDescription
callbackConduitSubscriptionCallback<T>The callback to add.

Returns

this

The manager.

Source

twitchfy/packages/eventsub/src/structures/ConduitSubscriptionCallbackManager.ts:33


execute()

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

Executes all the callbacks with the message.

Parameters

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

Returns

Promise<void>

Source

twitchfy/packages/eventsub/src/structures/ConduitSubscriptionCallbackManager.ts:45