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

# Base Roles

> Base Roles are the actual position roles in a tree and this is what the staff members actual

Once you have created a tree, you need to populate it with Base Roles. A Base Role represents the actual role of a staff member (e.g., Trainee, Moderator, Administrator). Nocturne uses the hierarchy of these base roles to determine which role the user will get when they promote.

***

<h2 id="role-add">
  Adding a Base Role
</h2>

To add a new base role to your tree, use the role add command.

<Badge color="red" size="sm">User: Manage Server</Badge>

<Tabs>
  <Tab title="Command" icon="code-simple">
    ```text Command theme={null}
    /tree role add <tree> <role> [position]
    ```

    ```text Example theme={null}
    /tree role add tree:Moderation role:@Helper
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <img src="https://mintcdn.com/nocturneidle/2-3YwYR-s24LwC-D/images/Tree-Role-Add-1-Helper.png?fit=max&auto=format&n=2-3YwYR-s24LwC-D&q=85&s=72864daa8528228941fba35b309c3d18" alt="Tree Role Add: Helper" title="Tree Role Add: Helper" className="mx-auto" style={{ width:"80%" }} width="523" height="276" data-path="images/Tree-Role-Add-1-Helper.png" />
  </Tab>
</Tabs>

***

<h3 id="position-parameter">
  Understanding the `position` Parameter
</h3>

The `position` parameter dictates where the role sits in the chain of command.

* **1 is the lowest position** (the root/bottom of the ladder).
* As the position number increases (2, 3, 4...), the role becomes higher in authority.
* **If left blank,** Nocturne will automatically assign the role to the highest available position in that tree.

<Tabs>
  <Tab title="Text Example" icon="code-simple">
    ```text Command theme={null}
    /tree role add tree:Moderation role:@Moderators
    /tree role add tree:Moderation role:@Trainee Mod position:2
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <Columns cols={2}>
      <Column>
        <img src="https://mintcdn.com/nocturneidle/HGP1XeHwOgeZO9_d/images/Tree-Role-Add-2-Mod.png?fit=max&auto=format&n=HGP1XeHwOgeZO9_d&q=85&s=8cb2fc925a4785f6d70bbb3bebe748bf" alt="Tree Role Add: Mod" title="Tree Role Add: Mod" className="mx-auto" style={{ width:"98%" }} width="532" height="562" data-path="images/Tree-Role-Add-2-Mod.png" />
      </Column>

      <Column>
        <img src="https://mintcdn.com/nocturneidle/HGP1XeHwOgeZO9_d/images/Tree-Role-Add-2-Trainee-Position.png?fit=max&auto=format&n=HGP1XeHwOgeZO9_d&q=85&s=111b204354b9c571d0f165f572854655" alt="Tree Role Add: Trainee at Position 2" title="Tree Role Add: Trainee at Position 2" className="mx-auto" style={{ width:"91%" }} width="520" height="591" data-path="images/Tree-Role-Add-2-Trainee-Position.png" />
      </Column>
    </Columns>
  </Tab>
</Tabs>

**In the above example:**

* `@Helper` was already added. We add `@Moderators` role to the top now, which will be position 2.
* Let's say we forgot to add the `@Trainee Mod` role, so we use the `position` parameter to add it in between `@Helper` and `@Moderators` roles.

***

<h2 id="role-remove">
  Removing a Base Role
</h2>

If you want to remove a role from the hierarchy, you can delete the base role from the tree.

<Badge color="red" size="sm">User: Manage Server</Badge>

<Tabs>
  <Tab title="Command" icon="code-simple">
    ```text Command theme={null}
    /tree role remove <tree> <role>
    ```

    ```text Example theme={null}
    /tree role remove tree:Moderation role:@Admins
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <img src="https://mintcdn.com/nocturneidle/2-3YwYR-s24LwC-D/images/Tree-Role-Remove.png?fit=max&auto=format&n=2-3YwYR-s24LwC-D&q=85&s=6cb06be1ba0a2ffe4743ba0a2fca86dc" alt="Tree Role Remove" title="Tree Role Remove" className="mx-auto" style={{ width:"80%" }} width="516" height="246" data-path="images/Tree-Role-Remove.png" />
  </Tab>
</Tabs>

<Warning>
  Removing a base role removes its place in the hierarchy. If you have members currently holding this role, Nocturne will no longer recognise them as being part of this tree's staff ladder until they are reassigned to a valid base role. \
  *(Note: This does **not** delete the actual role from your Discord server; it simply unlinks it from the Nocturne tree).*
</Warning>

***

<h2 id="role-reorder">
  Reordering a Base Role
</h2>

If you want to change the position of a role which is already present in a tree, along with making sure you move its linked roles too, you can use the reorder command.

<Badge color="red" size="sm">User: Manage Server</Badge>

<Tabs>
  <Tab title="Command" icon="code-simple">
    ```text Command theme={null}
    /tree role reorder <tree> <role> <position>
    ```

    ```text Example theme={null}
    /tree role reorder tree:Moderation role:@Helper position:1
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <img src="https://mintcdn.com/nocturneidle/Keqj0N3yO-Ia9i09/images/Tree-Role-Reorder.png?fit=max&auto=format&n=Keqj0N3yO-Ia9i09&q=85&s=94d670b11ccde394dc6a0b3e70ed21d5" alt="Tree Role Reorder" title="Tree Role Reorder" className="mx-auto" style={{ width:"50%" }} width="560" height="710" data-path="images/Tree-Role-Reorder.png" />
  </Tab>
</Tabs>

**In the above example:**

* `@Helper` role, which was already in the tree in position 2, will be moved to position 1.
* The linked roles, if any, associated with that role were also moved with it.

***

<h2 id="role-replace">
  Replacing a Base Role
</h2>

If you want to just change a specific base role in a tree, while maintaining its position as well as linked roles, you can try the replace command.

<Badge color="red" size="sm">User: Manage Server</Badge>

<Tabs>
  <Tab title="Command" icon="code-simple">
    ```text Command theme={null}
    /tree role replace <tree> <role> <new-role>
    ```

    ```text Example theme={null}
    /tree role replace tree:Moderation role:@Head Mod new-role:@Admins
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <img src="https://mintcdn.com/nocturneidle/Keqj0N3yO-Ia9i09/images/Tree-Role-Replace.png?fit=max&auto=format&n=Keqj0N3yO-Ia9i09&q=85&s=6c6549b8c38e99a8e3f1335a33ef5a2d" alt="Tree Role Replace" title="Tree Role Replace" className="mx-auto" style={{ width:"50%" }} width="561" height="680" data-path="images/Tree-Role-Replace.png" />
  </Tab>
</Tabs>

**In the above example:**

* The `@Head Mod` role is replaced by the `@Admins` role.
* The position and the linked roles are preserved.
