Fragment
A fragment of a message.
Type parameters
Type parameter | Value |
---|---|
T extends FragmentTypes | FragmentTypes |
Constructors
new Fragment()
Builds up a fragment.
Parameters
Parameter | Type | Description |
---|---|---|
data | FragmentData <T > | The data of the fragment. |
Returns
Fragment
<T
>
Source
twitchfy/packages/eventsub/src/structures/messages/Fragment.ts:37
Properties
Property | Modifier | Type | Description |
---|---|---|---|
cheermote | readonly | T extends "cheermote" ? Cheermote : null | The cheermote in the fragment. Null if the fragment’s type isn’t cheermote. |
content | readonly | string | The content of the fragment. |
emote | readonly | T extends "emote" ? Emote : null | The emote in the fragment. Null if the fragment’s type isn’t emote. |
mention | readonly | T extends "mention" ? Mention : null | The mention in the fragment. Null if the fragment’s type isn’t mention. |
type | readonly | T | The type of the fragment. |