Skip to content

@mastondzn/dank-twitch-irc / TwitchEmote

Class: TwitchEmote

Single instance of a twitch emote in a message string.

Constructors

new TwitchEmote(id, startIndex, endIndex, text)

new TwitchEmote(id, startIndex, endIndex, text): TwitchEmote

Parameters

id: string

startIndex: number

endIndex: number

text: string

Returns

TwitchEmote

Source

src/message/emote.ts:31

Properties

code

code: string

The part of the original message string that was recognizes as an emote, e.g. "Kappa".

Source

src/message/emote.ts:29


endIndex

endIndex: number

exclusive end index in the original message text. Note that we count unicode code points, not bytes with this. If you use this, make sure your code splits or indexes strings by their unicode code points, and not their bytes.

Source

src/message/emote.ts:24


id

id: string

Numeric ID identifying the emote.

Source

src/message/emote.ts:8


startIndex

startIndex: number

inclusive start index in the original message text. Note that we count unicode code points, not bytes with this. If you use this, make sure your code splits or indexes strings by their unicode code points, and not their bytes.

Source

src/message/emote.ts:16