Discord bot not coming online

When running my discordjs bot, the bot does not say “online” when expected, and the bot in Discord doesn’t come online either. I suspect I am being ratelimited, but no errors in console are being logged. The code only works during the nighttime, around 10pm. Any ideas why the bot is not coming online?

Can you please share a link to the repl?

https://replit.com/@AdvancedAPI/BohemianBot

Hi @AdvancedAPI when I ran your code (just now for a timestamp) I saw this:

image

I can only suggest that if you are not seeing this message at particular times of the day you are being rate limited as all Discord bots running on Replit contribute to the ratelimit.

How would I fix this?

You can’t bypass the Discord ratelimit system because it is on the Discord API to prevent spam. Hundreds of these Discord Bots on replit is hosted and running on the same IP Address at the same time causing this ratelimit. The only way to fix this is to host this on your own computer or server and if you also want to run a dashboard for your bot then you would have to mess with your WiFi router to make it public and accessible (or use localtunnel which I really do not reccomend for a public project).

You could also buy a VPS and host your bot there without any issues.