Skip to content

Fragment

A fragment of a message.

Type parameters

Type parameterValue
T extends FragmentTypesFragmentTypes

Constructors

new Fragment()

1
new Fragment<T>(data: FragmentData<T>): Fragment<T>

Builds up a fragment.

Parameters

ParameterTypeDescription
dataFragmentData<T>The data of the fragment.

Returns

Fragment<T>

Source

twitchfy/packages/eventsub/src/structures/messages/Fragment.ts:37

Properties

PropertyModifierTypeDescription
cheermotereadonlyT extends "cheermote" ? Cheermote : nullThe cheermote in the fragment. Null if the fragment’s type isn’t cheermote.
contentreadonlystringThe content of the fragment.
emotereadonlyT extends "emote" ? Emote : nullThe emote in the fragment. Null if the fragment’s type isn’t emote.
mentionreadonlyT extends "mention" ? Mention : nullThe mention in the fragment. Null if the fragment’s type isn’t mention.
typereadonlyTThe type of the fragment.