it-muslim / discord-bots

Discord bot written in Node.js that counts thanks to users of IT-Muslim Community server.
0 stars 1 forks source link

Butler bot failures #16

Closed al-muammar closed 5 years ago

al-muammar commented 5 years ago

Periodically, ButlerBot fails with the following errors:

info: Connected
info: Logged in as:
info: undefined - (undefined)
events.js:188
      throw err;
      ^

Error: Unhandled "error" event. ([object Object])
    at Client.emit (events.js:186:19)
    at WebSocketConnection.onError (/home/hqa/discord-bots/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:374:17)
    at WebSocket.onError (/home/hqa/discord-bots/node_modules/discord.js/node_modules/ws/lib/event-target.js:128:16)
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
    at _receiver.cleanup (/home/hqa/discord-bots/node_modules/discord.js/node_modules/ws/lib/websocket.js:211:14)
    at Receiver.cleanup (/home/hqa/discord-bots/node_modules/discord.js/node_modules/ws/lib/receiver.js:557:13)
    at WebSocket.finalize (/home/hqa/discord-bots/node_modules/discord.js/node_modules/ws/lib/websocket.js:206:20)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
al-muammar commented 5 years ago

The problem was that we were not handling errors, which caused the client to crash. Now that's fixed. Closing the issue.