Discord Bot Guide¶
This document explains how to set up and use the Discord bot included with EasyAdmin 6.6 and newer. This bot lets you manage your FiveM server from Discord.
🚀 What is the Discord Bot?¶
The Discord bot is included with EasyAdmin and does not require external hosting. This is especially useful for:
- Containerized FiveM setups
- Hosted servers (e.g., ZAP-Hosting)
🔧 Features¶
The bot offers the following functionality:
| Feature | Description |
|---|---|
| User Actions | Kick, Ban, Unban, Mute, Unmute, Freeze, Slap, Warn |
| Action History | View a player's past moderation actions with /history |
| Admin Notes | View admin notes left on a player with /notes |
| Principals | Add/remove Discord users to ACE groups directly from Discord |
| Live Server Status | Player count, admins online, reports, uptime, upvotes |
| Area Cleanup | Remove vehicles, peds, and objects in an area |
| Player List | Full, paginated list (compatible with OneSync) |
| Player Info | View identifiers and other details |
| Discord ACE Permissions | Assign permissions via Discord roles directly to FiveM ACE groups |
| Chat Bridge | Sync chat between Discord and FiveM |
| Logging | Log actions in a dedicated channel |
🤖 Creating the Bot User¶
- Go to Discord Developer Apps.
- Create a new application.
- Under the Bot tab, create a bot user.
- Enable all Privileged Gateway Intents (required for the bot to work).
❗ If you don't enable these, you'll get an error like:
Privileged intent provided is not enabled or whitelisted
🔄 Inviting the Bot¶
Use this link to invite the bot to your server:
1 | |
- Replace
MY_BOT_IDwith your bot's Application ID (found in Discord Developer Portal). - If you get a 401 error, kick the bot and invite it again using the link.
⚙️ Configuring the Bot¶
Add the following to your server.cfg to let EasyAdmin log in using the bot:
1 | |
- Replace
your-bot-token-herewith the token from the Discord Developer Portal.
Start your server. If the bot logs in successfully, you'll see this in your console:
1 | |
Check your Discord server to confirm the bot is online.
🧑💼 The server owner has all permissions by default. For others, assign permissions manually using
easyadmin.bot.
🔐 Configuring Bot Permissions¶
All bot permissions are grouped under the easyadmin.bot category.
Here's a recommended configuration for regular admins who should not modify permissions:
1 2 3 4 5 6 7 8 9 10 | |
🔄 Configuring Features¶
📦 Discord ACE Permissions¶
You can assign permissions to Discord roles, just like groups in FiveM.
Example:
1 2 | |
To make a Discord role inherit permissions from a group:
1 | |
🔄 Permissions sync when a player joins or when they run
/refreshpermsin Discord.
🔄 Migrating from Other ACE Resources¶
If you used a third-party ACE resource like DiscordAcePerms, you can replace this:
1 | |
With:
1 | |
Add this to server.cfg.
📜 Bot Logging Channel¶
To set a logging channel:
- Copy your Discord channel ID (right-click channel > Copy Channel ID).
- Add this to your
server.cfg:
1 | |
⚠️ If you set a log channel, the webhook logging will be ignored.
🔄 Log Forwarding¶
You can forward specific logs to other channels:
1 | |
Available log types:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
📊 Live Server Status¶
To enable the live server status:
- Create a read-only channel for the bot.
- Set it in your config:
1 | |
The bot will post and update a live status message with server stats.
💬 Chat Bridge¶
⚠️ Requires the latest
chatresource from cfx-server-data.
To sync chat between Discord and FiveM:
- Create a Discord channel for the chat bridge.
- Add this to your config:
1 | |
- Messages sent in that Discord channel will appear in FiveM chat.
- Messages sent in FiveM chat will appear in the Discord channel.
✅ Done!¶
You're all set! If you need help with anything, check the EasyAdmin documentation or reach out in the community.
💡 Tip: Always test your bot in a test server before deploying to a live one.