File Isn't Running 24/7 Even Though I Linked Uptimerobot To It

Hi there! I had just made a new discord bot using repl, and I hooked it up to uptime robot to keep it running, but the bot keeps going offline every two minutes or so, so then I have to open up the project and run it again. Is there something that I am doing wrong?

You are viewing a single comment. View All
Answered by Coder100 [earned 5 cycles]
View Answer

oh, nvm. Ok, so the problem is that you have no HTTP server! Http servers is what makes the bots stay alive (a terminal app shuts down after you close the tab, but a web server shuts down after 1 hour of no activity). So, just add this to your code (anywhere in the file):

and your bot will work!