I’m still quiet new to coding but was interested to make my own twitch bot for witch I used tmi.js and faced a problem. I can’t identify any emotes! I’m not really sure but what I wanna do is should look like this
var emotes = new Set()
axios
.get(
''//May be some sort of api witch allows to check if emote listed on channel
)
.then(response => emotes.add(/*emotes from Twitch/BTTV/FFZ*/+" "))
if (message.startsWith('!emotecheck')){
if(emotes.indexOf(message.toLowerCase())>=0){
client.say(channel, emotes + 'found in your messages')
//if message was "!emotes hi! Kappa how bttvNice are you? ZreknarF " it should response with "Kappa bttvNice ZreknarF found in your message"
}
}
I was only able to check if any of default twitch emotes was in message but was not able to identify actual text of an emote
if (message.startsWith('!emotecheck')&&tags.emotes!==null){
client.say(channel, "Your message has one of default twitch emotes")
}
If I try to log for emotes it only shows
emotes:{25: Array(1)}
25:(1) ['12-16']
0:'12-16'
length:1
__proto__:Array(0)
__proto__:Object
Thanks in advance!