Discord bot shutdown at midnight
I have simple discordy.py bot running on repl.it with Flask server running, so it "keeps it alive". But every morning, the script looks like it stopped working for some reason. I have monitor set up, so it can ping the server, which looks just fine, but when I look on repl.it, I can clearly see that the bot is down and stopped. Is there any way to keep my bot alive 24/7?
EDIT and SOLUTION:
Thank you all for contributions, the error was much simpler (and probably dumber). I had 1 input() in the script, so when it restarted, it did not recieve this input. So I simply had to credate .env file and with os.getenv() fetch variables that I would otherwise input manually.
Well there is two reasons:
- Either your code breaks, because something hasn't been handled or something
- You haven't hooked it up to uptime robot
- Something is goofy with repl, I've had that happen before
try using uptimers. They work 100%. But you can also get hacker plan, which has the always on feature.