A Discord bot that uses UptimeRobot to detect if a service is down or not.
This does require you to have a UptimeRobot account and setup monitors on your UptimeRobot account.
- Download the source by using
git clone https://github.com/kt5company/discord-uptimerobot
in a command prompt that has Git installed. - Make sure you have Node.js + npm (node.js v12+) installed and run
npm i
inside the folder. - Open
auth.json
with any text editor and... 3a. ReplaceDISCORD TOKEN HERE
with your Discord bot's token. 3b. ReplaceUPTIMEROBOT TOKEN HERE
with your UptimeRobot account's token. - Open
info.json
with any text editor and...
- Replace
YOUR DISCORD ID HERE
with your Discord user ID. - Replace
YOUR PREFIX HERE
with the prefix you'll be using to trigger the bot.
- When you have everything configured, run
npm start
in your terminal/command prompt. - Invite the Discord bot to your server and use
(prefix)ping
to make sure it's running.
Make sure that all IDs you use are still in the quotes or else the last 2 numbers will be zeros, this goes with all IDs in the JSON files.
Since v2, monitors are now defined in data/db.json
. For every monitor -- there should be another list in the collection.
If you look in the commands/service.js
script, you will see an "example monitor".
First you must find ID number of the monitor.
Go to bot.js
and uncomment the lines 70-72.
Save the file and run the bot.
Check your console and you should see a list of monitors from your UptimeRobot account.
Find the monitor ID you would like to use for this example, it will be above the monitor's "friendlyname"
.
In the "db.json" file, in the "name"
value the monitor whatever you like because it doesn't really matter. But in the "value"
value, enter in your monitor ID.
You can now change the example case name in the service
command to use when you want to look at the information for that monitor.
If you wanted to add more monitors, repeat the 2nd part of this process, copy the lines 3-7 in db.json
and make sure to change the "value"
to your other monitor ID, and copy the lines 26-50 in commands/service.js
and make sure to change the case name to something different and change the monitorlist[0].value
to monitorlist[1].value
; the more you add, the higher the number is.
Search for your info.json and change the values in "guild"
to your chosen guild ID and "channel"
to your chosen channel ID.
Make sure that the IDs you use are still in the quotes or else the last 2 numbers will be zeros, this goes with all IDs in the JSON files.
- Deletes old "auto-monitor-reporting" messages.
- Fixed bugs.
Find questions to things you might be asking yourself
For help with anything, join our support server.
For bugs, file an issue.