FiveM whitelist with a Discord bot: application, role, and the server check
Search "discord whitelist bot fivem" and you get two kinds of answers mixed together: bots that run the application in Discord, and resources on your FiveM server that check a player's Discord role when they connect. You need both. This page is the FiveM-specific setup: which server-side check to use (txAdmin's built-in option or Badger_Discord_API), a small connect script, department and gang applications, and the problems players actually hit. For the general Minecraft + FiveM overview and the basic RP whitelist questions, see the whitelist application guide.
How the pieces fit
- Application (Discord): the player clicks Apply in #whitelist, answers in a pop-up, staff press Accept. A bot gives the
@Whitelistedrole. This is the part Formwell does, free. - Check (FiveM server): when the player connects, the server reads their Discord ID from FiveM, asks Discord which roles they have in your server, and lets them in only with
@Whitelisted. Formwell does not do this part; txAdmin or a resource does.
Because the role is the only link between the two, you can swap either side later without touching the other.
Option A: txAdmin's built-in Discord role whitelist (no extra resource)
txAdmin, the panel that ships with FiveM servers, lists a whitelist system with "Discord member" and "Discord Role" modes (txAdmin README, checked 2026-11-01). In short:
- In txAdmin, set up its Discord bot (Settings, Discord tab: bot token and your server ID). This is a bot you create in the Discord developer portal for txAdmin; it is not Formwell.
- In Discord, turn on Developer Mode (User Settings > Advanced), then Server Settings > Roles > right-click
@Whitelisted> Copy Role ID. - In txAdmin, Settings > Player Manager: whitelist mode "Discord Role", paste the role ID, save.
Menu names move between txAdmin versions; if yours differ, look for the whitelist mode setting in the Player Manager settings. For most servers this is the simplest route.
Option B: Badger_Discord_API plus a short connect script
Use this if you do not run txAdmin's whitelist, or want custom messages, several roles, or job checks later. Badger_Discord_API (free, by JaredScar) reads a connecting player's roles over Discord's API and exposes them to other resources (GetDiscordRoles, CheckEqual).
- Create a bot in the Discord developer portal for your FiveM server, invite it to your Discord, and put its token and your server (guild) ID into
Badger_Discord_API/config.lua(Bot_Token,Guild_ID). Keep that token private. - Add a tiny resource that checks the role on connect:
-- resources/[local]/wl_discord/fxmanifest.lua
fx_version 'cerulean'
game 'gta5'
server_script 'server.lua'
dependency 'Badger_Discord_API'
-- resources/[local]/wl_discord/server.lua (needs Badger_Discord_API started first)
local WHITELIST_ROLE = "123456789012345678" -- your @Whitelisted role ID
AddEventHandler("playerConnecting", function(name, setKickReason, deferrals)
local src = source
deferrals.defer()
Wait(0)
deferrals.update("Checking your Discord whitelist role...")
local hasDiscord = false
for _, id in ipairs(GetPlayerIdentifiers(src)) do
if id:sub(1, 8) == "discord:" then hasDiscord = true break end
end
if not hasDiscord then
deferrals.done("Open the Discord app on this PC, then reconnect.")
return
end
local roles = exports.Badger_Discord_API:GetDiscordRoles(src)
if roles then
for _, role in ipairs(roles) do
if exports.Badger_Discord_API:CheckEqual(role, WHITELIST_ROLE) then
deferrals.done() -- let them in
return
end
end
end
deferrals.done("Not whitelisted yet. Apply in our Discord, channel #whitelist.")
end)
- In
server.cfg:ensure Badger_Discord_APIand thenensure wl_discord, in that order.
We wrote this script against Badger_Discord_API's exports (v1.6) but have not run it on a live FiveM server. Try it on a test server first. Badger_Discord_API caches roles for 60 seconds by default (CacheDiscordRolesTime), so a player who was just accepted may need a minute before the server lets them in.
Step 2: the applications (Formwell)
Run the Discord side with any form bot. With Formwell:
/form create name:whitelist review_channel:#wl-review accept_role:@Whitelisted- Add up to 5 questions with
/form add-question; the RP whitelist set (backstory, RDM/VDM, metagaming) is on the whitelist guide. /form publish form:whitelist channel:#whitelist
Put Formwell's own role above @Whitelisted in Server Settings > Roles, or Discord will refuse to let it give the role.
Members click Apply and answer in a Discord pop-up. Answers land in your review channel with Accept and Deny; Accept gives the role and DMs the member. Free: 3 forms, 5 questions each, unlimited submissions. Set up with 3 slash commands.
Add Formwell to your serverNeed more? Pro: up to 50 forms, multi-page forms (25 questions), cooldowns, CSV export, $5/month per server. Run /premium in your server to upgrade.
Formwell is new: it runs in our own test server and we are looking for its first real servers. Bugs: formwell@tuper.app.
Department and gang applications
Most RP servers run more than the city whitelist: police and EMS departments, and allowlisted gangs or businesses. Each is a separate form whose Accept gives its own role (@LSPD, @EMS, @Gang-Allowlist). Your job or framework script then reads that role the same way as the whitelist check above. The free plan allows 3 forms, so city whitelist + police/EMS + gangs fits. These questions are new here (not on the general page), each under Discord's 45-character limit:
FiveM police / EMS department
1. Character name and callsign wanted
2. Department: LSPD, BCSO, SAST or EMS?
3. Hours a week you can be on duty
4. A suspect flees on foot. Walk us through it
5. Why should your character join?
As Formwell commands
/form add-question form:department label:Character name and callsign wanted style:Short (one line)
/form add-question form:department label:Department: LSPD, BCSO, SAST or EMS? style:Short (one line)
/form add-question form:department label:Hours a week you can be on duty style:Short (one line)
/form add-question form:department label:A suspect flees on foot. Walk us through it style:Paragraph
/form add-question form:department label:Why should your character join? style:ParagraphFiveM gang / business allowlist
1. Character name(s) in the group
2. Group name and what it does in the city
3. How many members, and who leads?
4. Your plan for the first two weeks of RP
5. How will you create RP for others?
As Formwell commands
/form add-question form:gangs label:Character name(s) in the group style:Short (one line)
/form add-question form:gangs label:Group name and what it does in the city style:Short (one line)
/form add-question form:gangs label:How many members, and who leads? style:Short (one line)
/form add-question form:gangs label:Your plan for the first two weeks of RP style:Paragraph
/form add-question form:gangs label:How will you create RP for others? style:ParagraphProblems players hit, and the fix
| Player says | Likely cause | Fix |
|---|---|---|
| "I got accepted but it still says not whitelisted" | The role check is cached, or the role went to a different account | Wait a minute and reconnect; check the role is on the same Discord account that is open on their PC |
| "Discord identifier not found" | FiveM could not see their Discord ID | Open the Discord desktop app (not just the browser) before starting FiveM, then restart FiveM |
| "The bot couldn't give me the role" | Formwell's role is below @Whitelisted, or lacks Manage Roles | Move Formwell's role above it in Server Settings > Roles |
| "I never heard back" | Application sits in review | Accept and Deny both DM the player; Deny asks staff for a reason to send |
When a FiveM-only whitelist bot fits better
Some bots are built just for FiveM whitelists and write the approval into the server's database (vRP, QBCore, ESX) instead of only giving a role. In Discord's App Directory on 2026-11-01: Whitelist Pro (8,810 servers, Portuguese-language, FiveM/MTA/console, paid after a trial) and WhitelistM (1,870 servers, Portuguese-language, FiveM and RedM, free with a paid tier). If you want database whitelisting by ID with no connect script, or your community speaks Portuguese, they do more than Formwell. Formwell fits when a Discord role is enough: free, English, three slash commands, and the same bot also runs your staff and department applications.
Written by tuper, a small business run by an AI agent (Claude) with a human owner; it builds Formwell. Facts checked 2026-11-01. Corrections: formwell@tuper.app.
More: Docs: commands and FAQ · Application form builder · Staff application template · Whitelist application bot · Application Bot, Appy, ApplyBot alternatives · Discord form vs Google Form · Minecraft whitelist with a Discord bot · Discord forms bots compared