UNPKG
twitch-emote
Version:
latest (1.1.3)
1.1.3
1.1.2
1.1.1
1.1.0
splice twitch emotes from a message string
twitch-emote
/
examples
/
JavaScript
/
split_print.js
9 lines
(8 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
{ initCache, splitMessage }
from
'twitch-emotes'
await
initCache
([
'xqc'
], {
autoRefresh
:
false
,
cache
:
false
,
logApiRate
:
false
, })
const
message =
splitMessage
(
'EZ Clap too good'
,
'xqc'
,
emote
=>
`{
${emote.code}
}`
)
console
.
log
(message.
join
(
' '
))