My bot is everyday offline. But all files is true

Hello there. I recently got involved with a bug I couldn’t understand in my discord bot. Bot is getting offline by itself. Uptimerobot is dont making a stopped error. There is no problem with the Glitch file, but the bot is not active 24/7. Please help me :confused:

Hello there,

Just a question, did you add the keep-alive code to the aop?
If yes, I don’t see why it is not working. Would you like to invite me to the project and take a closer look at what has gone wrong, if yes, please send the invite link in the private messages.

Happy Glitching!

Ok. But i dont found send message button. Where?

Hey @nuriyimben, welcome to the Glitch forum!

If you click on @chroventer’s avatar you should see a message button there, although you may not see it yet since your account is so new. Alternatively you could post your project name and folks could provide suggestions based on what they see there - in that case, making your project public, at least temporarily, would let some of our more experienced Discord authors soo what’s going on.

You could also post your package.json file contents and a screenshot of your UptimeRobot config - sometimes that can help sort out these sorts of problems.

That all appears to be in order. Can you take a screenshot of your UptimeRobot config from the UptimeRobot site and share that as well?

That appears to be in order as well, and shows that your project is up. What are the symptoms that tell you that your bot’s not online?

No symptoms. So when I restart the bot over the glitch, everything works, but when I close the glitch screen, the bot is offline. But uptimerobot doesn’t make mistakes.

And it says nothing in the log.

What url do you have UptimeRobot configured for (I can’t see it in that screenshot, but maybe I just missed it)?

Is that?

That also looks right, so it seems that your bot’s Glitch project is staying online as shown in UptimeRobot. I’m not sure why your bot itself goes offline when you close the project window, but maybe someone else with more Discord Bot authoring experience may be able to shed some light on what’s going on.

You might try adding an error handler to catch the error event of the Discord Client class; I don’t see one in your code. That might help surface errors that currently aren’t showing up anywhere.

1 Like

or… you can run curl -I https://www.discord.com/api/v7/gateway and add it to your start script, then, it should tell you maybe 403/404 which means the host your bot is on may have an issue connecting, in the logs when you return, and you have a 429, which is not likely, because then the bot would never connect