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) and paste the Discord role ID into each permission group in bridge/[framework]/permission_groups.lua Permission Groups.

1

Create a role

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

2

Copy Role ID

3

Set the Role ID

Set the discord group ID for the permission group

data/default_permission_groups.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 = {}
  }
}
4

Make sure you have Permissions.UseDiscord enabled

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

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

Last updated