> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeonbot.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Permission Hierarchy

> Understand the layered permission system that controls who can use which commands.

ZEON uses a layered permission hierarchy to determine who is allowed to run specific commands. This system operates **independently from Discord's built-in permissions** and gives server owners fine-grained control over bot access.

## The Hierarchy

Permissions are checked from the **highest level down**. A user at a higher level automatically inherits all permissions from the levels below them.

<CardGroup cols={1}>
  <Card title="1. Server Owner" icon="crown" color="#dc2626">
    The actual Discord server owner. Full access to everything, cannot be overridden.
  </Card>

  <Card title="2. Extra Owner" icon="star" color="#ea580c">
    Users added via `.extraowner add`. Full access to everything except managing the Extra Owner list (max 5).
  </Card>

  <Card title="3. Trusted User" icon="shield-check" color="#ca8a04">
    Users added via `.trusted add`. Access to most configuration commands (max 15).
  </Card>

  <Card title="4. Admin" icon="gavel" color="#2563eb">
    Users with Administrator permission + a top role higher than the bot's highest role. Access to general module commands.
  </Card>

  <Card title="5. Everyone" icon="users" color="#6b7280">
    All server members. Access to basic utility commands only.
  </Card>
</CardGroup>

<Warning>
  * Only the actual **Server Owner** can manage the Extra Owner list. Extra Owners cannot add or remove other Extra Owners.
  * **Trusted Users** cannot manage Extra Owners — only the Server Owner can do that.
  * The **Admin** level requires **both** the Administrator permission **and** a role positioned higher than the bot's top role in the role hierarchy.
</Warning>

***

## How It Works

Every command in the bot is gated by one of these permission checks. When you run a command, the bot checks your identity against these levels in order:

<Steps>
  <Step title="Server Owner Check">
    Are you the Discord server owner? If yes, you pass every check automatically.
  </Step>

  <Step title="Extra Owner Check">
    Are you in the Extra Owners list for this server? If yes, you are treated like the server owner for bot commands.
  </Step>

  <Step title="Trusted User Check">
    Are you in the Trusted Users list? If yes, you can use most configuration and moderation commands.
  </Step>

  <Step title="Admin Check">
    Do you have the **Administrator** permission AND is your top role higher than the bot's? If yes, you can use general module commands.
  </Step>

  <Step title="Denied">
    If none of the above match, access is denied and an error embed is shown.
  </Step>
</Steps>

<Note>
  The specific check used depends on the command. Critical commands like `.extraowner` require **Server Owner** level, while module commands like `.boostgreet set` use the **Admin** level check (which also passes for all higher levels).
</Note>
