BaseSubscriptionMessage
The base class for all the subscription messages.
Extends
Base
<T
,K
>
Extended by
ChannelAdBreakBeginMessage
ChannelChatClearMessage
ChannelChatClearUserMessagesMessage
ChannelFollowMessage
ChannelUpdateMessage
ChannelChatMessageMessage
StreamOnlineMessage
Type parameters
Type parameter |
---|
T extends SubscriptionTypes |
K extends ConnectionTypes |
Constructors
new BaseSubscriptionMessage()
Builds up a BaseSubscriptionMessage.
Parameters
Parameter | Type | Description |
---|---|---|
connection | K | The EventSub connection used. |
subscription | SubscriptionType <T , K > | The subscription which trigger this message. |
Returns
BaseSubscriptionMessage
<T
, K
>
Overrides
Source
twitchfy/packages/eventsub/src/structures/messages/BaseSubscriptionMessage.ts:15
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
connection | readonly | K | The EventSub connection used. | Base .connection |
subscription | readonly | SubscriptionType <T , K > | The subscription which trigger this message. | Base .subscription |
Methods
checkMessageType()
Checks whether the message is of a certain type.
Type parameters
Type parameter | Value |
---|---|
U extends SubscriptionTypes | SubscriptionTypes |
Parameters
Parameter | Type | Description |
---|---|---|
type | U | The type to check. |
Returns
this is SubscriptionMessages<K>[U]
Whether the message is of the type.
Source
twitchfy/packages/eventsub/src/structures/messages/BaseSubscriptionMessage.ts:24