Unban a FiveM player from a Discord ticket with one button
By Termi2 min read
A player opens an unban ticket, staff agree, and then somebody has to join the game, find the console or open the database. With game buttons, staff press Unban on the ticket and your game server does it for the player who opened the ticket. The result shows up in the ticket a second later.
What a button looks like
Buttons sit on the ticket's first message. You can have up to five per server, and each one has:
- a label and an emoji, like "Unban" or "Reset Discord ID",
- a colour,
- the event name your script listens for, like
myserver:unban, - who can press it (ticket staff, or only some roles),
- which ticket categories show it, so Unban only appears on ban appeals.
A Discord administrator can always press a button, so the owner never locks themselves out.
What your script gets
The bridge fires a server event with the player's identifiers (license, Discord, Steam and the rest) and, when they are online, their character from ESX, QBCore, Qbox, ox_core or vRP. Your developer adds a few lines like these:
AddEventHandler('myserver:unban', function(data, done)
local license = data.player.identifiers.license
done(true, 'Unbanned')
end)
Whatever you pass to done is posted in the ticket with the name of the staff member who pressed the button. If the game server is offline, the ticket says so and nothing runs.
Ideas for buttons
| Button | What the script does |
|---|---|
| Unban | Removes the ban from your ban script or database. |
| Change character data | Fixes a wrong name or date of birth. |
| Reset Discord ID | Unlinks an old Discord account so the player can log in with a new one. |
| Return vehicle | Sends a lost car back to the garage. |
Setting it up
- Update the FiveBot bridge to 0.26.0 or newer.
- In the dashboard open Settings, then Game buttons, and add a button. The page shows a preview of the ticket and the script your server needs.
- Put the script in any server resource and restart it.
Event names that belong to FiveM or FiveBot are refused, so a button cannot fire something it should not.
Questions people ask
Which plan do I need?
Game buttons work on every plan. Prices are on fivebot.ai/pricing.
Does the player have to be online?
No. Their identifiers come from FiveBot, so Unban works for a player who cannot join. Character data is only sent while they are in the game.
Can I use it with txAdmin bans?
Yes, if your script lifts the ban. How FiveBot works with txAdmin.
Is FiveBot affiliated with Cfx.re?
No. FiveBot is not affiliated with Cfx.re, Rockstar Games or Take-Two Interactive.