Queue System
Troubleshooting
Troubleshooting
Console: "Discord is on … but there is no bot token"
The queue found no token. Check, in this order:
server.cfghasset suty_queue_bot_token "YOUR_BOT_TOKEN"aboveensure suty-queue(a convar set after the resource starts is not seen until a restart of the resource)- It is
set— notsetrorsets - Or
secrets.luahasBotToken = '...' - Restart the resource after changing it:
restart suty-queue
Without a token no roles can be read: everyone gets the base priority, and with UseWhitelist = true nobody passes the whitelist.
Console: "The Discord bot token is in config.lua: move it…"
Your config.lua still has Token (from an older version). It keeps working, but move it to server.cfg (set suty_queue_bot_token "...") and delete it from config.lua, so it doesn't travel with the resource.
Bot token invalid
Test by querying:
GET https://discord.com/api/v10/guilds/<GUILD_ID>/members/<USER_ID>
Authorization: Bot <BOT_TOKEN>
401 = bad token. 403 = bot lacks permissions. 404 = wrong guild or user.
If it leaked or you're not sure: Developer Portal → Bot → Reset Token, and put the new one in server.cfg.
Players see "License not found" or "Discord not found"
QueueConfig.DiscordBot.RequireLink = truerequires every player to have Discord linked on FiveM. Players with no Discord linked get rejected.- For testing, set
RequireLink = falseto allow connections without Discord.
Players see "Not whitelisted"
- They're missing the role of the
RoleHierarchyentry named exactlyWhitelist— check that entry has your whitelist role ID - OR they're not in your Discord server (no roles can be read)
- Verify the bot can READ members:
View Memberspermission AND Server Members Intent enabled in the Developer Portal
Players see "Too many connection attempts"
Server.ConnectionRateLimit = true limits attempts by IP. Behind a proxy/CDN all players share the proxy's IP and block each other: set it to false (limits by license instead).
Nobody can get in / everyone stays in the queue
QueueConfig.TestEnvironment.Activatemust befalseon a live server- Test mode may still be on from the console:
queuestatusshows it, andqueuetestswitches it off
My design doesn't show (players get the classic card)
QueueConfig.Interface.Designmust be exactly'autopista','embarque'or'carrera'— anything else is the classic card- An old
config.luawithoutDesignkeeps the classic card: take theInterfaceblock from the newconfig.lua - If the console shows
[Queue] Drawn card failed, showing the classic one: …, send that whole line on Discord — players still get in with the classic card meanwhile
My server name shows twice
Brand (small title above the card) and Sign (the sign in the scene) both show text. Leave Brand = '' and put your name in Sign.
Priority not stacking
QueueConfig.Priority.CombinePoints = true — must be true for stacking. With false, only the highest single role's value counts.
Live embed isn't updating
QueueConfig.LiveEmbed.Enabled = true- The webhook is set:
set suty_queue_webhook "..."inserver.cfg(orLiveEmbedWebhookinsecrets.lua). The console warns at start if it's missing - The webhook URL is valid (paste it in a browser → should return JSON, not an error)
UpdateInterval >= 3— Discord rate-limits webhooks. Lower than 3 seconds gets rate-limited and silently drops updates
Reconnect grace doesn't work
Priority.ReconnectGrace.Enabled = trueDurationis in seconds —3000= 50 minutes (NOT milliseconds)- The player must have played at least 5 minutes before the crash, and quitting on purpose doesn't count
- More than 3 "crashes" in an hour stop the bonus (anti-abuse)
- The reconnecting player must use the SAME Discord account
"Silent banned" player still got in
- Their Discord role must EXACTLY match an entry in
Priority.PermanentQueue.Roles PermanentQueue.Enabled = true- The bot must be able to see the role assignment (members intent)
- Test by setting their role and checking
Server.LogToConsole = true— you should see them queued but never connected
Server doesn't queue at all
suty-queuemust boot BEFORE the framework. Checkserver.cfgensure order.sv_maxclientsmust be set- If
ForceQueue.Enabled = false(default), the queue only triggers when the server is full
Dynamic delay seems wrong
DynamicDelayTiers is checked from the first entry down: list it with the most slots first. The delay is in seconds between connections.
Still stuck?
Discord — include QueueConfig.DiscordBot.Active, whether you're using the whitelist, and the relevant server console lines (never your bot token).
