# Discord Permissions

You can synchronize permission groups in the Admin Menu with Discord roles. To do this, you need to set up the Discord Bot (See: [Avatars](/docs/lc_adminmenu/avatars.md)) and paste the Discord role ID into each permission group in `bridge/[framework]/permission_groups.lua`  [Permission Groups](/docs/lc_adminmenu/permissions/permission-groups.md).

{% stepper %}
{% step %}

### Create a role

Go to your Discord Server Settings -> Roles and create a role relevant to the permission group.
{% endstep %}

{% step %}

### Copy Role ID

<figure><img src="/files/GP6WW4sIdQes6q2OE03s" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Set the Role ID

Set the discord group ID for the permission group

{% code title="data/default\_permission\_groups.lua" %}

```lua
---@class PermissionGroup
---@field tier number
---@field name string
---@field discord_role_id? number
---@field permissions string[]

return {
  {
    tier = 1, -- lower tier - stronger
    name = 'owner',
    discord_role_id = 'PUT_DISCORD_ROLE_ID_HERE',
    permissions = { 'all' }
  },
  {
    tier = 2,
    name = 'admin',
    discord_role_id = nil,
    permissions = {
      'spectate',
      'freecam',
      'invisibility',
      'summon_player',
      'godmode',
      'player_names',
      'esp',
      'noclip',
      'kick',
      'player_notes',
      'revive',
      'teleport',
      'give_item',
      'clear_inventory',
      'routing_buckets',
      'ban_add',
      'ban_delete',
      'licenses_edit',
      'trust_score_edit',
      'trust_score_reset',
      'character_edit',
      'accounts_edit',
      'vehicle_add',
      'vehicle_delete',
      'announcements',
      'weather_management',
      'management'
    }
  },
  {
    tier = 10,
    name = 'trial',
    discord_role_id = nil,
    permissions = {}
  }
}
```

{% endcode %}
{% endstep %}

{% step %}

### Make sure you have Permissions.UseDiscord enabled

Go to the `config_server.lua` and see if you have Discord permissions enabled.

{% code title="config\_server.lua" %}

```lua
return {
  ...,
  Permissions = {
    UseDatabase = true,
    UseAcePerms = false,
    UseDiscord = true-- CHANGE THIS FROM FALSE TO TRUE
    UseFramework = false
  }
}

```

{% endcode %}

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://libertycode.gitbook.io/docs/lc_adminmenu/permissions/discord-permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
