Skip to content

API Reference / MessageFragmentType

Variable: MessageFragmentType

const MessageFragmentType: object

Defined in: types.ts:126

Type Declaration

Text

readonly Text: "text" = 'text'

Basic text from a message. This can include emojis as well as emotes from other services (like FFZ, BTTV, etc.), as long as they are still in their text form.

Emote

readonly Emote: "emote" = 'emote'

A Twitch emote. The emote's name should be provided as MessageFragment.text. It's expected that there won't be colons around the name, since Twitch doesn't actually include those in their messages.

Mention

readonly Mention: "mention" = 'mention'

A @mention of another user. Don't worry about providing this type unless you already have the data separated and available. The library will still attempt to detect and ignore leading mentions in text fragments.