|
|
|
@ -17,11 +17,7 @@ class TwitchChannel extends Channel {
|
|
|
|
|
this.viewerCount = null;
|
|
|
|
|
this.chat.getUserInfo(this.name).then((data) => {
|
|
|
|
|
this.pubWs = new TwitchPubSubSocket(data.id);
|
|
|
|
|
this.pubWs.on('verbose', (data) => {
|
|
|
|
|
console.log('Twitch PubWS', data);
|
|
|
|
|
});
|
|
|
|
|
this.pubWs.on('MESSAGE', (data) => {
|
|
|
|
|
console.log('MESSAGE', data);
|
|
|
|
|
if(data && data.data && data.data.message) {
|
|
|
|
|
let parsed = JSON.parse(data.data.message);
|
|
|
|
|
|
|
|
|
|