Bot will crash when user hosts channel
taskinoz opened this issue · 1 comments
taskinoz commented
When someone hosts a channel the bot has joined, it will crash and spit out the following error
C:\Users\Tristan\Desktop\test-bot\node_modules\twitch-bot\lib\parser.js:33
parsed.username = username.split('!')[0]
^
TypeError: Cannot read property 'split' of undefined
at Object.formatPRIVMSG (C:\Users\Tristan\Desktop\test-bot\node_modules\twitch-bot\lib\parser.js:33:32)
at TLSSocket.irc.on.data (C:\Users\Tristan\Desktop\test-bot\node_modules\twitch-bot\lib\bot.js:76:32)
at TLSSocket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:265:13)
at TLSSocket.Readable.push (_stream_readable.js:224:10)
at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)