WebSocketSubscriptionCallbackManager
The callback manager for a WebSocketSubscription.
Type parameters
Type parameter |
---|
T extends SubscriptionTypes |
Constructors
new WebSocketSubscriptionCallbackManager()
Creates a new WebSocketSubscriptionCallbackManager.
Parameters
Parameter | Type | Description |
---|---|---|
connection | WebSocketConnection | The connection that created this manager. |
Returns
WebSocketSubscriptionCallbackManager
<T
>
Source
twitchfy/packages/eventsub/src/ws/structures/WebSocketSubscriptionCallbackManager.ts:28
Properties
Property | Modifier | Type | Description |
---|---|---|---|
connection | readonly | WebSocketConnection | The connection that created this manager. |
Methods
add()
Adds a callback to the manager.
Parameters
Parameter | Type | Description |
---|---|---|
callback | WebSocketSubscriptionCallback <T > | The callback to add. |
Returns
this
The manager.
Source
twitchfy/packages/eventsub/src/ws/structures/WebSocketSubscriptionCallbackManager.ts:40
execute()
Executes all the callbacks with the message.
Parameters
Parameter | Type | Description |
---|---|---|
message | SubscriptionMessages <WebSocketConnection >[T ] | The message to execute the callbacks with. |
Returns
Promise
<void
>
Source
twitchfy/packages/eventsub/src/ws/structures/WebSocketSubscriptionCallbackManager.ts:52