How can I uptime my discord bot on glitch

I’ve a problem uptiming my discord bot on glitch

EDIT: So it turns out that it is not allowed on Glitch to ping websites. So If you were using something like replit, then the instructions below are for you. However if you want it for free, replit needs payment.

But if you want to know how to do it, here is how:

Hello @Khalid_Reda! I have hosted many bots using It is a free tool that simply pings your bot. Here is how it works:

In a new file, called, insert this code:

from flask import Flask
from threading import Thread

app = Flask('')

def main():
  return "Your bot is alive!"

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

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

In your or the main file, add these lines of code:

from keep_alive import keep_alive #Imports the keep_alive function from
#All the bot code ASIDE from the / Client.start
#Now start your bot here

This will create a flask server. Get the glitch link, such as
In, create a new pinging bot, and then insert the link from the flask server.

If you have all the code properly made, you will get an output like this (very basic imitation:

Bot started
[TimeStamp] ---
[TimeStamp] ---
[TimeStamp] ---
Client running
[TimeStamp] ---
[TimeStamp] ---
[TimeStamp] ---
"Bot alive... or whatever your discord bot start message is"

I hope this helps!

P.S: Uptimerobot is a little unstable, sometimes the bot will be offline, but for the most part, it should stay up and running
P.P.S: if this helps, please mark it as the solution!

pinging projects is against glitch’s terms of service and will most likely get your project suspended. If you’re looking to keep your bot running 24/7, you should invest in glitch pro or find an alternative hosting service.

glitch rules aside, does this work? I heard that uptimerobot connections always get 403 or something and never wake up the proejct

I had it working for a long time before the url for Gizmo was removed.