tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.56k stars 211 forks source link

Exiting Error in CLEARCHAT #161

Closed itsatony closed 8 years ago

itsatony commented 8 years ago

Actual behaviour: exiting the process

Expected behaviour: not dying ;)

Error log:

TypeError: str.replace is not a function
    at Object.module.exports.get.isBoolean.isFinite.isInteger.isJustinfan.isNull.isRegex.isString.isURL.password.promiseDelay.replaceAll (/node_modules/tmi.js/lib/utils.js:42:20)
    at client.handleMessage (/node_modules/tmi.js/lib/client.js:592:40)
    at /tmi.js/lib/client.js:912:36
    at Array.forEach (native)
    at client._onMessage (node_modules/tmi.js/lib/client.js:911:11)
    at WebSocket.onMessage (/node_modules/ws/lib/WebSocket.js:418:14)
    at emitTwo (events.js:100:13)
    at WebSocket.emit (events.js:185:7)
    at Receiver.ontext (/node_modules/ws/lib/WebSocket.js:816:10)
    at /node_modules/ws/lib/Receiver.js:477:18

Server configuration

Schmoopiie commented 8 years ago

Hey @itsatony, do you happen to know what was the ban that triggered this error ?

itsatony commented 8 years ago

no, sorry. it happened multiple times within about 1 hour, but the client had joined more than 300 channels. i can try and log the message. i wrapped it in a try catch so it should be easy... will get back to you on it

Schmoopiie commented 8 years ago

Okay because I think it has something to do with the ban reason that somehow ends up being null and it ends up throwing an error because there is nothing to replace

Schmoopiie commented 8 years ago

Closing this issue as it never happened again so we can't really fix it.. if anyone happens to have this error, please report the ban reason that caused this, thanks!