> For the complete documentation index, see [llms.txt](https://libertycode.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://libertycode.gitbook.io/docs/lc_adminmenu/permissions/discord-permissions.md).

# 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 %}
