Possible IP Ban? Where to look for error
Hi! After running smoothly for several months, my bot can't login any longer from a particular server. The server has network connectivity, but there is no progression when calling client.login.
I am handling:
But the client.login simply does nothing. When running locally or on another server, I get the ready handler. Is there an event I can listen to which will tell me why I can't login? In the discord devs Discord, someone noted that it would say clearly in the response if I'm IP Banned.
5 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!
- ✅
Marked as resolved by OPthe debug event will output a bunch of stuff if the login() call is successful (even if ip banned), so if you're not seeing stuff in terminal, your login() call is not being made
Thanks!
OK. I moved the debug and warn code above the client.login call. Now I can see something.. but not much!
This is generated when I call client.login on the server that suddenly stopped working:
and then nothing! I deployed in a different server (DigitalOcean) and it's working fine, but I'm super concerned about possible ban for the game moving forward.
It's running on a DigitalOcean droplet, so it's likely shared. I don't use extra webhooks in it. Will look up those other error codes, thanks so much! I just changed my game's behavior and it causes a lot more button hitting in combat, so the usage profile of the bot would have changed also.
Makes sense (and I hope that's the issue). Will move to client.rest.on('rateLimited', ...); and see if anything is generated
Deployed on a new dedicated server and is running fine (of course, it is a new IP). I did see rate limiting messages come in right away. It adds the numbers 1-10 under the message as reactions for people to vote on, and those apparently triggered limiting. I added a sleep in there and no trigger. Will keep an eye out for more! Marking as solved, and thanks so much for your help @Qjuh