Discord Roles
Give slots to players with Discord roles, for example supporters, boosters or patrons.
⚙️ Setup
- Create a bot in the Discord Developer Portal, turn on the Server Members intent and invite it to your server.
- Add the bot token to
server.cfg:
set kmc_discord_token "your bot token"- Set your guild id and the role ids:
Config.Discord = {
enabled = true,
guildId = '123456789012345678',
cacheMinutes = 10,
roles = {
['234567890123456789'] = 3, -- role id = slots
['345678901234567890'] = 5,
},
}🧮 How it counts
The player's highest role counts, and it competes with the default, ace and VORP limit for the base number of slots. See Character Slots.
Roles are cached for cacheMinutes. Admins can press Refresh Discord roles in the Admin Panel to pick up a change straight away.
The player's Discord must be linked in FiveM/RedM, otherwise the server can't see their Discord id.