Discord bot for managing and monitoring website uptime. It has full support of the new slash commands feature with simple commands to montitor a list of websites.
Node.js v16.9.0
or newer is required
Make sure you have Nodejs installed by visiting the following download page https://nodejs.org/en/download/
git clone https://github.com/the94air/monitord.git
npm install # or yarn install
You need to setup the .env
file with the proper info from the example file .env.example
. The credentials consists of:
TOKEN
The bot token. This is a full guide on how to generate that token using your discord account https://discordjs.guide/preparations/setting-up-a-bot-application.html
GUILDID
The guild ID (the server ID) which can be found when you left click the server icon and choose the Copy ID
option while having developer mode turned on https://beebom.com/how-enable-disable-developer-mode-discord/
Some options are required to make the bot run properly with slash commands support. If you navigate to your bot settings on the discord portal https://discord.com/developers/applications, make sure to have these settings set to ON
:
PRESENCE INTENT
SERVER MEMBERS INTENT
MESSAGE CONTENT INTENT
To run the bot on development mode, you can run these commands in two seporate terminals (optional: in case you want to modify the bot logic)
npm run build:watch
npm start
To run the bot on production mode
npm run build
npm start
To be able to use the bot commands on your server, you most first publish them
npm run commands
To Configure the logging channel you need to run the bot and then you can use the /channel
command on your discord server
To get a list of the available commands type /
/ping
Will show you the connection latency.
/channel
For setting the channel that will receive both uptime and downtime log messages.
/list
For listing all the sites that has been added for monitoring and the status of each of them. It should contain both, the monitored and nonmonitored websites.
/new
For creating a site.
/remove
For removing a site.
/modify
Used for modifying site information.
/start
Used for starting a monitor session of a website.
/status
Used for showing monitor status of a website.
/stop
Used for stopping a monitor session of a website.
/restart
Used for restarting a monitor session of a website.
/refresh
Used for refreshing all active monitor sessions.
/suspend
Used for suspending all active monitor sessions.
MIT Copyright © 2021 - present, Abdalla Arbab and contributors