Closed jdotrjs closed 6 years ago
I guess we'll have to hook into the error event and attempt to connect again
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-error
Man, everyone's been having this problem lately. I'll submit a pull that should fix your problem in a minute
Finally hit this again with the linked patch in place:
r$ node index.js
Ready!
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Error: [object Object]
Ready!
It did not successfully resume operation so I'm going to leave this open after merging that patch since it does move us in the right direction.
Didn't you say you were going to leave it open?
I did; in the process of justifying that I convinced myself to close it. I only added that in the commit message though because I forgot it wouldn't be visible anywhere else.
Thanks to this change we no longer crash when the websocket goes down but something seems to break the ability. Given root issue was about crashes going to close this until I have a better understanding of the failure mode for reactions.
Ok. Didn't actually read the commit message :smile:
the discord websocket will error out if it gets closed by the remote end the bot doesn't handle restarting in that case:
two changes requested:
/ping
that we can hook to pingdom to monitor bot status