I'm making a statuspage(statuspage.io) for my discord bot, and I want to record the downtime automatically with uptimerobot. But I have no idea how. Does a discord bot (written in python) use a specific port, which can be used to see if the bot is online? Or do I need to do this somehow with the discord API to check if the bot is online? I haven't found anything, except something with a discord bot hosted on glitch, but I don't host anything on that site, I host it myself.
Also how do I connect uptimerobot with statuspage?
For uptime robot to work, you need a publicly facing webpage that it can request every 5 minutes.
Two options:
Your discord bot needs to run in the cloud and run a http server at the same time
Have your web server accept another request like example.com/keepalive
to tell the server that the bot is still running.
Uptime robot would then query example.com/alive
and you have to return 200 OK if the bot is online and 404 if offline.
NOTE: If you already have something like the 2nd approach running, you may as well just save the uptime info on your public server. I also recommend passing some authentication in headers or as a query (password, for example) if you use this to avoid people abusing it.