Skip to content
Sign upLog in
← Back to Community
About keeping a discord bot online 24/7
Profile icon
YeetyMcYeetster

Hello,

I have hosted my discord bots (in js and in py) and i have never ran in to a problem until now with my discord.py bot. I am using keep_alive and uptimerobot is pinging it everything runs fine but when i close my tab then the bot stops working, in uptimerobot there are no errors.
My keep_alive.py file:

from flask import Flask from threading import Thread app = Flask('') @app.route('/') def main(): return "alive" def run(): app.run(host="0.0.0.0", port=8080) def keep_alive(): server = Thread(target=run) server.start()
Voters
Profile icon
Light-Studio
Profile icon
Musicplanet
Profile icon
BoyOneChamp
Profile icon
Nanamiaoyama
Profile icon
MateoBentoglio
Profile icon
AuntieKey
Profile icon
nakanme
Profile icon
PrakharBhandari
Profile icon
isige
Profile icon
YeetyMcYeetster
Comments
hotnewtop
Profile icon
Ven0m515

Same for me too.

Profile icon
isige

this happens to me sometimes too idk
i'm trying to run the Red framework for 2 bots, and i only have 1 rpi which can barely handle 1

Profile icon
CubingOP

use uptime robot for pinging your webserver every 5 minutes.

Profile icon
a7blockeyblue

@CubingOP
How? I have had UpTime running it with the "Up" status and its not online.

Profile icon
CubingOP

@a7blockeyblue
watch from 58:42 for hosting bot and creating web server https://www.youtube.com/watch?v=SPTfmiYiuok

Profile icon
AliKilicoglu

same

Profile icon
BeAsT700

what do i do ?