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
/
TypeScript
/
split_print.ts
12 lines
(8 loc)
•
279 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
{ initCache, splitMessage }
from
'twitch-emotes'
await
initCache
([
'xqc'
], {
autoRefresh
:
false
,
cache
:
false
,
logApiRate
:
false
, })
const
message =
splitMessage
(
'EZ Clap too good'
,
'xqc'
, (emote):
string
=>
`{
${emote.code}
}`
)
console
.
log
(message.
join
(
' '
))