Manage FiveM players from Discord: money, items and bans with /assistant
By Termi4 min read
A player opens a ticket: "my car is gone after the restart". To check, someone has to join the game or open the database. With FiveBot, staff type /assistant in the ticket and ask "what cars does he own?". The answer comes from your game server in a few seconds, and only the person who asked sees it.
What you can ask
| Question | What comes back |
|---|---|
| "How much money does he have?" | A player card with job, cash, bank, dirty money and any other currency your server uses, such as coins or crypto |
| "What's in his inventory?" | Items and vehicles on the same card |
| "Is this guy banned?" | Bans in force from txAdmin, FiveBot and Discord, however old |
| "Who owns the house on Grove Street?" | An answer read from your game database |
| "Give him 500 gold coins" | A button that makes the change once you press it |
Inside a ticket the assistant knows who opened it, so "he" is the player who wrote in. In any other channel you can @mention a member and it reads that person. It also finds players by name, license or Discord ID.
Changes wait for a button
When you ask for a change, FiveBot answers with buttons: give or take money and items, set a job, revive, heal, kick or unban, with Cancel next to them. A press checks again that you're allowed, shows Working, and then Done or the reason it failed, for example that the player went offline.
Unban finds every ban in force on that player across txAdmin, FiveBot and Discord and lifts them all from one card. Ban appeals use the same code, so a ban lifted by the assistant ends exactly like one lifted from an appeal.
Anything in your game database
Money, items and cars come from your framework: ESX, QBCore, Qbox, ox_core or vRP. For everything else, such as houses, phone numbers, gangs, licences, fines or the tables of your own scripts, the assistant reads your database through the bridge. It looks at the list of tables, writes one SELECT and reads up to 50 rows.
The bridge runs reads only. It refuses writes, locks and anything that could stall MySQL, stops a query after 5 seconds, and never reads columns named like passwords, tokens, hardware IDs or IP addresses.
Your own actions
Under Settings, Assistant actions you can add up to 10 things the assistant may do on your server. Each one is a server event or a console command template such as givecar {id} {model}, with up to four fields and a sentence saying when to use it. "Give Kowalski an Adder" then becomes a card with a Run button, or runs at once if you switch on Run without asking for that action.
{id}is filled in only for a player who is online and whose license matches.quit,exec,set,rconand commands that touch ACE permissions are refused.- If a command is admin only, the settings page shows the
add_aceline your server.cfg needs.
Who can use it
The switch is under Settings, AI, Assistant on Discord, and it's on by default. The Discord server owner can always ask and make changes. Admins, and any roles and people the owner adds, can ask questions. Turn on Let them make changes if they should press the buttons as well. Only the workspace owner can edit this list.
The same assistant is in the dashboard: press Cmd or Ctrl + J on any page.
Setting it up
- Install the FiveBot bridge on your game server. Database answers and your own actions need 0.31.1 or newer.
- Check who may ask under Settings, AI, Assistant on Discord.
- Type
/assistantin a ticket and ask about the player.
Questions people ask
Which plan do I need?
Starter or higher. A question costs the same credits on Discord as in the dashboard, and your AI limits and kill switch apply to both. Prices are on fivebot.ai/pricing.
Can the assistant write to my database?
Database questions are read only. Changes go through your framework (money, items, job) or through actions you defined yourself, and each one shows a card first unless you picked Run without asking for that action.
Does it work when the player is offline?
Lookups do. Money and item changes on an offline character only touch accounts already saved on that character, and a currency from a shop script only changes while the player is online. The reply says so when that happens.
Can other people see the answers?
No. /assistant replies privately, so only the person who asked sees the answer, even in a public channel.