#bot stops logging in (seemingly random)

16 messages · Page 1 of 1 (latest)

jovial rose
#

After a while of stopping and running my code, the bot will just stop logging in. There is no error provided, and I am using replit but I believe this is more of a discord.js error because I heard something about the client going into cooldown after too many logins

atomic gust
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

golden nexus
#

i know my bot used to just stop running out of nowhere on replit, are you using the free version?

#

im pretty sure it has something to do with replit not liking it when you use too many resources

golden cobalt
#

you shouldn't use replit, it uses shared ips so when someone uses replit to spam the discord api (which is a lot) it will ratelimit your bot as well iirc

jovial rose
#

hmm yeah I have hacker plan
I really like replit so I would prefer to not have to switch to another service but if you have better suggestions lmk

sick garden
#

That's one of the issues of the hacker plan

#

The program doesn't stay on forever

#

It just restarts once it shuts down

#

over and over again

#

That makes your program log into your bot every 5 minutes, which can ratelimit your bot

#

A solution you could implement is creating a webserver using Express

#

That will allow your program to stay online for up to an hour

#

When your bot is pinged while it's still running, you won't get ratelimited because you aren't repeatedly logging in

#

I hope that makes sense