Discord roles, sync and "Suspended member"
Each group can carry a Discord role, set and removed automatically (or, if you prefer, Discord is the source of truth); the Suspended member setting decides what happens to roles during a suspension.
Updated on Oct 5, 2026, 9:25 a.m.
On this page
In short. With the Discord bot set up, each forum group can be linked to a Discord role. Giving the group gives the role, removing the group removes the role. The Suspended member setting decides what happens to roles during a suspension.
Link a group to a role #
- Set up the bot: see Connect Discord.
- Administration → Configuration → Discord connection, Discord roles for groups section.
- For each group, pick the role from your server's role list.
- Save.
A role shown as "⚠ role not found" was deleted on Discord: pick another one. A role "(managed by an integration)" cannot be assigned. If a role does not arrive, remember a bot can only give roles placed below its own: see Missing Discord permission; Discord's official help explains the hierarchy: Discord Roles and Permissions.
A role that is too high is refused up front #
A role the bot will not be able to give (placed above its own or at the same rank, or managed by an integration) is greyed out in the list, with the reason. Picking it anyway (stale form) is refused when saving: nothing is written. If Discord does not answer, the save still goes through, with a warning. If you later move roles in Discord, the mappings that became impossible show in red in Administration → Configuration → Discord connection, under Mappings Discord will refuse, with an Open in the Discord app button to the screen where you fix them. The same rule applies to the MDT rank roles (see below).
When roles move #
| Event | Effect on Discord |
|---|---|
| Application accepted (form that grants a group) | The group's role is set, and the applicant gets a direct message |
| An administrator gives a group | The role is set |
| An administrator removes a group | The role is removed |
| Resync their Discord roles (member page) | The roles of their groups are set again, nothing is removed |
The Administration → Configuration → Discord connection banner shows the number of sync failures. A member's page shows the latest Discord calls (the sync log is kept for 90 days).
- A role the member holds through another group is never removed. Removing a group, or changing rank, does not strip a role that another of their groups gives them.
- A role that Discord refuses to remove is reported on screen instead of a misleading "done", and the refusal is recorded in Administration → Errors.
- The role menu marks power roles (Administrator, Ban, Manage roles…). An application that grants a group linked to one of them can only be accepted by an administrator, like a power group of the site.
When Discord is the source of truth: "Sync Discord → Agora" #
By default, Agora pushes: giving the group gives the role. For a group whose roles you already manage in Discord (a whitelist role given by another bot, a subscriber role…), you can reverse the direction, group by group. Below the group's mapping, the Sync Discord → Agora box is unticked by default. Ticked:
- a member who receives that role on Discord is added to the group on the site; if they lose it (or leave the server), they are removed from the group;
- Agora no longer pushes anything to Discord for that group: the member's page shows "managed by Discord";
- the role's rank no longer matters (the bot never assigns it, it listens to it);
- each addition or removal is written to the administration log, author Discord.
Never for a power group: the box is greyed out (and refused when saving) for admin, moderateur, the groups of the Staff page, groups that carry rights and application-examiner groups. MDT ranks are not concerned: they come from the game.
How it works. Agora listens to Discord through an open connection only when at least one box is ticked (no periodic task), and applies the events to accounts linked by their Discord ID. A member without an account is aligned at their first sign-in. At startup and after any reconnection that was not resumed, Agora re-reads the linked members' roles once to catch a missed event; the Resync button does the same read on demand. The last re-read date only appears if Discord was really read: with no date, nothing has been re-read yet (for example, the connection to Discord is not established).
Two modes (the screen says which one is active):
| Mode | What it needs |
|---|---|
| Member events (full), the one to aim for | Server Members Intent enabled in the developer portal (Bot tab) |
| Audit log (fallback) | If Discord refuses the intent, Agora reconnects by itself without it. The bot's role then needs the View Audit Log permission. Limit: a member who leaves on their own is only noticed at the next re-read |
To go from fallback to full mode: enable Server Members Intent, then click Resync. If it does not work: Missing Discord permission, cause 5.
Discord roles of ranks (MDT) #
In MDT → Settings, the Service Discord block can give one role per job rank. Agora sets the role of the rank held and removes the other rank roles of that job:
- when the MDT is opened (at most every 10 minutes per member);
- as soon as the game announces a job or rank change (hire, promotion, leaving), even if the member no longer has any MDT department: someone who leaves the police loses their rank role without opening anything. The announced rank needs the up-to-date resource; an older resource only reports the job change (see Update the resource).
Safety rules:
- A rank role of a job the member never held (set by hand) is not removed by this change.
- Roles held through a forum group are never removed.
- The jobs of all their characters count: the role stays as long as one of their characters still holds the rank. With multi-job (Qbox), switching the active job removes nothing; only jobs really left count.
- A suspended member with the "remove their roles" option also loses their rank roles; they come back on lifting.
The "Suspended member" setting #
Administration → Configuration → Discord connection, Suspended member block:
| Choice | Effect |
|---|---|
| Keep their Discord roles (default) | The forum, MDT, portal and tablet are closed to them; Discord is not touched |
| Remove their Discord roles during the suspension | The roles linked to their groups are removed, then given back when the suspension is lifted or ends. The bot must be set up |
| Remove their Discord roles AND refuse their connection to the game server | As above, and the FiveM resource refuses their connection to the server |
For the connection refusal:
- you need resource 1.9.8 or newer;
- the player is recognised by their game link (their account linked with a code);
- they see "Your community account is suspended until …: connection to the game server is refused during the suspension", with the reason;
- if Agora does not answer, the connection is let through.
Every change of this setting is written to the administration log.
Was this article helpful?
Related articles
- Connect Discord to Agora: sign-in, bot and rolesDiscord sign-in is mandatory; the bot, optional, assigns your groups' Discord roles and sends private messages.
- Manage members: groups, suspension, anonymisationAdministration → Members: give or remove a group, resync Discord roles, suspend, sign out everywhere, anonymise an account.
- Discord: role not given, missing permission, bot role too lowWhen a role does not arrive, it is almost always the bot's role sitting below the role to give, or the Manage Roles permission missing.
- Supported frameworks: ESX, QBCore, QboxAutomatic or fixed framework, what Agora reads in each framework, how a player is recognised, and the start order to follow in server.cfg.