Bot Randomly Shutdown without Logs
Hello,
My Bot randomly and without any logs or notice...went offline.
I have no code that forces it to go offline, around 10:30am UTC+1 it apparantly went offline; a re-deploy of the server fixed it.
Are there any Events I should subscribe to, incase this happens again, or any like:
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!DJS v14.8.0
Node v16.20.2
Yea probably something I aught to do.
But would that cause a total lack of any logs at all or even downtime for the server deployment?
Normally if it crashes I get an error and logs associated to the server rebooting.
I have none.
I suspect this is something I won't see again for an age, but I'd like to put something in to alert me to it next time
ah, that sucks, but understandable, I'll do that.
In that situation, would any props of
Client
change such as the ready state or the like, could I have the NodeJS process routinely check the status of the client and push myself a notification if something is "off"?
The bot went offline not through a presence change, can I check for that in any way, or due to a "hang" would that be impossible?
Ping the bot user, like with the raw API?
Humm, i could fetch its status with thst and that could alert me 🤔