Discord Bot Setup¶
EasyAdmin includes an integrated Discord bot that allows server management from Discord. The bot is bundled with EasyAdmin and does not require external hosting.
Prerequisites¶
- A Discord bot token
- A Discord server to add the bot to
- The bot must have Privileged Gateway Intents enabled (required for the bot to function)
Creating the Bot¶
- Go to the Discord Developer Portal.
- Click New Application and give it a name.
- Go to the Bot tab.
- Click Add Bot if prompted.
- Under Privileged Gateway Intents, enable:
- Guild Members Intent
- Message Content Intent
Without these intents, the bot will fail to connect with an error about privileged intents.
- Copy the bot token (click Reset Token if you need a new one).
Inviting the Bot¶
Generate an invite URL with the required permissions:
1 | |
Replace YOUR_BOT_ID with your bot's Application ID (found in the Discord Developer Portal under General Information).
Click the link and select your server to invite the bot.
Configuring the Bot¶
Add the bot token to your server.cfg:
1 | |
Restart your server. If the bot connects successfully, you will see a message in the console:
1 | |
The bot will appear online in your Discord server.
Bot Permissions¶
The bot requires specific Discord channel permissions to function:
- Send Messages — For chat bridge and status updates
- View Channels — To read messages in the chat bridge channel
- Embed Links — For formatted messages
- Read Message History — For chat bridge functionality
- Use Slash Commands — Required for bot commands
The invite URL above includes the necessary permissions. If you customize the invite, ensure these permissions are granted.
See Also¶
- Bot Commands — List of all available bot commands
- Logging — Configure the bot logging channel
- Chat Bridge — Sync chat between Discord and FiveM
- Server Status — Live server status display
- Discord ACE Permissions — Map Discord roles to FiveM permissions
- Webhooks — Set up moderation notifications