Skip to content

Commandserver/FiveM-Dashboard-Bot

Repository files navigation

FiveM-Dashboard-Bot

A Discord bot which displays the live-status of your FiveM Server.

GitHub release (latest by date) GitHub

Features

  • shows the live-status of your FiveM Server and how many players are currently playing on it
  • live-status of the official fivem status and AlleStörungen.de
  • A command to get the current fivem status
  • Restart detection of your fivem server with the help of your built-in TxAdmin Discord Bot

Preview:

This is how the live-dashboard message can look like. It gets updated every 8 seconds.

Commands

Message based commands:

!fivem show the current fivem status from AlleStörungen.de and status.cfx.re

!toggleuptimevisibility to toggle the visibility of the uptime in the status message

➥ You must be a server administrator to use this. Otherwise, the bot will not react.

!toggledowndetectorstatus to toggle the visibility of the FiveM Status from AlleStörungen.de in the status message

➥ You must be a server administrator to use this. Otherwise, the bot will not react.

!togglecfxstatus to toggle the visibility of the FiveM Status from status.cfx.re in the status message

➥ You must be a server administrator to use this. Otherwise, the bot will not react.

Dependencies:

  • Python3.8 or higher
  • For required python packages see the requirements.txt

Running

If you just want to have a /fivem slash command the get the fivem status on your server, you can also just invite my public discord bot to your server rather than running your own instance of it.

  1. Install dependencies

Just do pip3 install -r requirements.txt.

  1. Config

Modify the config template config.ini.

  1. Run the bot

Just do python3 bot.py.

Optional you can run the Bot in a screen session with the start.sh and stop.sh.

When the bot is running, it will create a log file named latest.log in the project directory.

Running with systemctl under Linux

I'd recommend running the Bot with systemctl to keep the bot always online. The systemd (.service) file could look like this:

[Unit]
Description=Discord FiveM Dashboard Bot
After=network.target

[Service]
ExecStart=/path_to_the_project/bot.py
Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

Required Discord permissions

The Discord Bot needs the following permissions:

  • View Channel (Read messages)
  • Send Messages
  • Embed Links
  • Manage Messages
  • Read Message History

Show your support

Be sure to leave a ⭐️ if you like the project and also be sure to contribute, if you're interested! Want to help? Drop me a line or send a PR.