UNPKG

twitch-emote

Version:

splice twitch emotes from a message string

18 lines (17 loc) 414 B
import { highestQuality, initCache, spliceMessage } from 'twitch-emotes' await initCache(['xqc'], { autoRefresh: false, cache: false, logApiRate: false, }) const message = spliceMessage('EZ Clap too good', 'xqc', emote => ({ name: emote.code, url: highestQuality(emote), })) message.forEach(part => { if (typeof part === 'string') { // string } else { // emote } })