My discord bot for monitoring my server stats
Find a file
2026-02-22 18:00:04 +01:00
.example.env docs 2025-06-02 11:53:38 +02:00
.gitignore initial commit 2025-06-02 11:40:15 +02:00
LICENSE docs 2025-06-02 11:53:38 +02:00
main.py shut up command 2026-02-22 18:00:04 +01:00
README.md usage 2025-06-02 11:54:10 +02:00
requirements.txt initial commit 2025-06-02 11:40:15 +02:00

Monitoring bot

The bot I use for monitoring my server. Can send you warnings if certain thresholds (ram/cpu usage, cpu temp, ...) are exceeded. You can also request a report with !report.

Setup

cp .example.env .env

Then, paste your bot token into .env.

To install the dependencies, create a venv if you want to

On Linux:

python3 -m venv .venv
source .venv/bin/activate

On Windows or Mac, ask ChatGPT xD.

Then, install dependencies:

pip install -r requirements.txt

Finally, run the bot:

python main.py

To set up a systemd service for the bot so it will auto-start every time you boot your server, create a file /etc/systemd/system/monitor.service" or monitoring-bot.service` or whatever.

Put something like this in the file (replace relevant fields):

[Unit]
Description=Discord System Monitor Bot
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/username/monitoring_bot
ExecStart=/home/username/monitoring_bot/.venv/bin/python /home/username/monitoring_bot/main.py
Restart=always
User=username

[Install]
WantedBy=multi-user.target

And run this (replace monitor with what you called the .service file):

sudo systemctl daemon-reload  # to load the changes
sudo systemctl start monitor  # to start it immediately
sudo systemctl enable monitor  # to launch it every time your server boots

Usage

Look at the code, it's pretty simple.

License

MIT License