Requirements
- A working FiveM server
- Basic access to your server files and
server.cfg - A Discord bot token
- Your Discord guild (server) ID
Setup
-
Download the
px_discordresource. -
Place the folder into your server’s resources directory.
Example structure:
resources/px_discord -
Open your
server.cfgand add the resource: ensure px_discord - Restart your server or run a refresh and start the resource manually.
Configuration
All behavior is controlled inside: config/server.lua This includes your Discord bot token, guild ID, connection validation settings, and optional role-based access control. At minimum, configure:- BotToken
- GuildId
How it starts
When the resource loads:- Discord configuration values are validated
- Guild connectivity is checked
- Player Discord identifiers are detected automatically
- Member data is fetched and cached
- Optional role validation is applied during connection
Troubleshooting
If the resource does not behave as expected:- Make sure the resource name is exactly
px_discord - Confirm your bot token is valid
- Verify the bot is inside your Discord guild
- Ensure the bot has permission to view server members
- Check your server console for debug logs (enable Debug in config if needed)