1. add channel api

This commit is contained in:
Jay
2018-08-16 16:49:54 +08:00
parent 4e610d87e3
commit bebb970ef5
5 changed files with 85 additions and 6 deletions
+3
View File
@@ -27,6 +27,9 @@ class WS {
// this.joinChannel(channel)
this.addCmdQueue(this.joinChannel, [channel])
})
event.on('twitchLeave', (channel) => {
this.addCmdQueue(this.leaveChannel, [channel])
})
event.on('twitchSend', data => {
if (!('msg' in data) || typeof data.msg !== 'string') return
if (!('channel' in data) || typeof data.channel !== 'string') return