24/7
StrawBester (1)

I need help to making it 24/7, i want a discord bot to be on 24/7.

You are viewing a single comment. View All
minx28 (160)

Python: use a Flask keepalive
JS: make an express server
For both of them, you also need to set up uptimerobot to ping the webpage that is created

VFDan (0)

@minx28 How do you set up uptimerobot?

minx28 (160)

@VFDan @TheDrone7 has made a nice tutorial on it - on his profile page, select the posts tab and it's one of his most recent ones

Patu (0)

@minx28 Sorry for being late, but how can I find the right flask keepalive script that I need to put on my code? I could only find in http

minx28 (160)

@Patu

from flask import Flask
from threading import Thread

app=Flask("")

@app.route("/")
def index():
    return "<h1>Bot is running</h1>"

Thread(target=app.run,args=("0.0.0.0",8080)).start()
Patu (0)

@minx28 Sorry for this, but I had already solved this. Thanks anyway!