如何解决如何识别和响应 BTTV/FFZ/Twitch 表情?
我对编码很陌生,但有兴趣为我使用 tmi.js 并遇到问题的女巫制作我自己的 twitch 机器人。我无法识别任何表情!我不太确定,但我想做的是应该看起来像这样
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"
}
}
我只能检查消息中是否有任何默认的抽搐表情,但无法识别表情的实际文本
if (message.startsWith('!emotecheck')&&tags.emotes!==null){
client.say(channel,"Your message has one of default twitch emotes")
}
如果我尝试登录表情,它只会显示
emotes:{25: Array(1)}
25:(1) ['12-16']
0:'12-16'
length:1
__proto__:Array(0)
__proto__:Object
提前致谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。