Discord.js Something took too long

My bot has been getting said error for the past few hours

Project name is peeky.

Can anyone help me out?

Hi @Vojtech_Jilovec, I’m sorry for the bother. Typically we’ll see this when one of our servers is banned by Discord, but right now we don’t have any banned hosts, and the host your project is on is able to communicate just fine with the Discord API (you can test this yourself by opening the console and using this command: curl -I https://discordapp.com/api/v7/gateway. If it says 200 OK in the response then your project’s host is not banned).

Since you project isn’t banned it’s possible that your bot’s token has been revoked by Discord, although if that were the case I’d expect to see problems from peeky.login(). Otherwise it would appear that something’s just timing out. Can you try to catch errors on specific commands or operations to see which one is timing out?

1 Like

Thanks for letting me know, Ill have a deeper look into it!

1 Like

Yeah, still no luck with the issue and I have no idea anymore.

I have remixed the project, disabled every operation/command and changed the token but it’s disconnecting after like 5 minutes of me starting the bot.

EDIT: Seems fixed now.

Aha! That’s perhaps a very different issue!

If you’ll take a look at our restrictions help document you’ll see that Glitch projects go to sleep after 5 minutes of inactivity. Maybe that’s what you’re running into? If so, this answer talks about the basic steps to keep your bot running 24 / 7 using UptimeRobot.

Hope this helps!

1 Like

Thank you for taking your time with me :raised_hands:

1 Like