Queue System

Troubleshooting

Troubleshooting

Console: "Discord is on … but there is no bot token"

The queue found no token. Check, in this order:

  • server.cfg has set suty_queue_bot_token "YOUR_BOT_TOKEN" above ensure suty-queue (a convar set after the resource starts is not seen until a restart of the resource)
  • It is set — not setr or sets
  • Or secrets.lua has BotToken = '...'
  • 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 = true requires every player to have Discord linked on FiveM. Players with no Discord linked get rejected.
  • For testing, set RequireLink = false to allow connections without Discord.

Players see "Not whitelisted"

  • They're missing the role of the RoleHierarchy entry named exactly Whitelist — 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 Members permission 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.Activate must be false on a live server
  • Test mode may still be on from the console: queuestatus shows it, and queuetest switches it off

My design doesn't show (players get the classic card)

  • QueueConfig.Interface.Design must be exactly 'autopista', 'embarque' or 'carrera' — anything else is the classic card
  • An old config.lua without Design keeps the classic card: take the Interface block from the new config.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 "..." in server.cfg (or LiveEmbedWebhook in secrets.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 = true
  • Duration is 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-queue must boot BEFORE the framework. Check server.cfg ensure order.
  • sv_maxclients must 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).

Merry Christmas.

From Suty.