Dragory / modmailbot

Modmail Bot is a bot for Discord that makes it easier for users to contact moderators and admins for help.
MIT License
699 stars 701 forks source link

bot shuts down for some reason #128

Closed untuned closed 6 years ago

untuned commented 6 years ago

events.js:167 throw er; // Unhandled 'error' event ^

Error: read ECONNRESET at TLSWrap.onread (net.js:660:25) Emitted 'error' event at: at Shard.emit (/home/untuned/modmail/node_modules/eris/lib/gateway/Shard.js:1877:26) at WebSocket.ws.onerror (/home/untuned/modmail/node_modules/eris/lib/gateway/Shard.js:1600:18) at WebSocket.onError (/home/untuned/modmail/node_modules/ws/lib/EventTarget.js:109:16) at WebSocket.emit (events.js:182:13) at WebSocket.finalize (/home/untuned/modmail/node_modules/ws/lib/WebSocket.js:182:41) at TLSSocket.emit (events.js:182:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19)

there should be an auto-restart + a message telling them the bot is offline

Dragory commented 6 years ago

There is no built in auto-restart because there are lots of tools that do that already. If you're on Linux or Mac, I would recommend pm2 (the command to start the bot would then be pm2 start npm -- start).

Dragory commented 6 years ago

Follow issue #88 for updates on the fix for ECONNRESET.

(Also, a message telling them the bot is offline is not possible since, well, the bot is offline, so it can't send a message like that)