Ask coding questions

← Back to all posts
About keeping a discord bot online 24/7
YeetyMcYeetster (5)


I have hosted my discord bots (in js and in py) and i have never ran in to a problem until now with my 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 file:

from flask import Flask
from threading import Thread

app = Flask('')

def main():
    return "alive"

def run():"", port=8080)

def keep_alive():
    server = Thread(target=run)
Ven0m515 (1)

Same for me too.

isige (1)

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

CubingOP (1)

use uptime robot for pinging your webserver every 5 minutes.

a7blockeyblue (0)

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

CubingOP (1)

@a7blockeyblue watch from 58:42 for hosting bot and creating web server