parseEmotes
Convert a message with emote codes into a message with emote images
Last updated
Convert a message with emote codes into a message with emote images
Last updated
Parse emotes in a message and return multiple methods to manage the results.
message
string
_emotePositions?
_options?
Converts parsed message into an array of words and emotes.
Converts parsed message into a ready-to-use HTML string.
scale?
number
inlineStyles?
boolean
escapeHTML?
boolean
Returns: string
Object map of:
key
string
ID of emote
value
string
Starting and ending position of emote on text formatted as {x}-{y}
Array of:
content
string
Word
position
string
Starting and ending position of word on text formatted as {x}-{y}
emote?
Parsed emote details, this suggests this word should be rendered as an emote.
images
string[]
Image URLs of the emote in different scales (asc)
overlays
List of emotes that should be rendered on top of the current emote
isZeroWidth?
boolean
If the emote is an overlay, only used internally
images
string[]
Image URLs of the emote in different scales (asc)
alt
string
Original emote code
channelId
string | null
ID of channel emotes will be fetched from
providers
List of enabled emote providers. All are active by default.
twitch
boolean
Enable Twitch emotes
bttv
boolean
Enable BTTV emotes
ffz
boolean
Enable FFZ emotes
seventv
boolean
Enable 7TV emotes
Returns: Promise<{
,
}>
Returns:
You can also add any providers you create. See guide for more information.