kritzware/twitch-bot

random disconnet

Closed this issue ยท 3 comments

hey there.

I have this random disconnect where the bot just leaves the channel without any errors and I have to restart the script.

any ideas to how I can test what's happening?

Hi @tcarlsen,

Perhaps you could use the message event and check if anything looks strange about the final chatter object, or the chat message itself, before a random disconnect.

Alternatively, you could log the raw IRC data block in node_modules/twitch-bot/lib/bot.js e.g.

  listen() {
    this.irc.on('data', data => {
      console.log(data) // Add this log statement and check if there is anything unusual before a disconnect    

    ...
    })
}

Let me know if you find anything ๐Ÿ‘

Haven't done it since I wrote this issue. No idea what happened before

Hmm that is strange, but no worries. Feel free to re-open this issue if it happens again ๐Ÿ‘