> ## 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.

# Tree Basics

> A Tree in Nocturne is a container for a specific staff hierarchy. Each tree acts like a ladder/promotional pathway and is used to keep departments separate (e.g., Moderation, Events).

<h2 id="tree-create">
  Creating a Tree
</h2>

To start building a hierarchy, you first need to create the tree itself.

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

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

    ```text Example theme={null}
    /tree create name:Moderation
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Tree-Create.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=48b82a11dd88c37912f64618d7a59b0a" alt="Tree Create" title="Tree Create" className="mx-auto" style={{ width:"60%" }} width="520" height="281" data-path="images/Tree-Create.png" />
  </Tab>
</Tabs>

<Tip>
  Tree names can be a maximum of 32 characters long. We recommend keeping them short and recognisable, as you will be typing them out frequently when running staff commands!
</Tip>

***

<h2 id="tree-view">
  Viewing Trees
</h2>

You can check the configuration of your trees at any time. This will display all the Base Roles, their Hierarchy Positions, and any Linked Roles attached to them, along with the status of custom DM Notices for that tree.

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

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

  <Tab title="Without [tree] parameter" icon="circle-1">
    **If you leave `[tree]` parameter blank,** the bot will display a high-level summary of *all* the trees currently configured in your server.

    ```text Example theme={null}
    /tree view
    ```

    <img src="https://mintcdn.com/nocturneidle/2-3YwYR-s24LwC-D/images/Tree-View-Overview.png?fit=max&auto=format&n=2-3YwYR-s24LwC-D&q=85&s=3e3768b7cfea747c4558108df2c60265" alt="Tree View: Overview" title="Tree View: Overview" className="mx-auto" style={{ width:"80%" }} width="487" height="298" data-path="images/Tree-View-Overview.png" />
  </Tab>

  <Tab title="With [tree] parameter" icon="circle-2">
    **If you provide a** `[tree] `**parameter,** the bot will display a detailed breakdown of that specific tree.

    ```text Example theme={null}
    /tree view tree:Moderation
    ```

    <img src="https://mintcdn.com/nocturneidle/2-3YwYR-s24LwC-D/images/Tree-View-Moderation.png?fit=max&auto=format&n=2-3YwYR-s24LwC-D&q=85&s=1e275003c2258f597532b3d46a29a929" alt="Tree View: Moderation Tree Details" title="Tree View: Moderation Tree Details" className="mx-auto" style={{ width:"80%" }} width="432" height="328" data-path="images/Tree-View-Moderation.png" />

    <Warning>
      In the detailed tree breakdown, you might see two types of **issues**:

      * **Warning symbol** next to a role: Nocturne cannot manage this role because it sits above Nocturne's own role in the server hierarchy. Fix it by dragging Nocturne's role above it in `Server Settings > Roles`.
      * **(Deleted)** next to a role: The role has been deleted from your server. Nocturne will throw errors until you run `/fix` to clean it up. See the [System Fix Guide](/commands/system-fix) for details.
    </Warning>
  </Tab>
</Tabs>

***

<h2 id="tree-rename">
  Renaming a Tree
</h2>

If you ever need to rebrand a department, you can easily rename an existing tree without having to recreate all the roles inside it.

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

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

    ```text Example theme={null}
    /tree rename tree:Event name:Event Team
    ```
  </Tab>

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

<Note>
  Renaming a tree updates it everywhere in the database. You will immediately use the new name when running `/staff` commands.
</Note>

***

<h2 id="tree-delete">
  Deleting a Tree
</h2>

If a department is shut down or you want to start from scratch, you can permanently delete a tree.

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

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

    ```text Example theme={null}
    /tree delete name:Partnership
    ```
  </Tab>

  <Tab title="Visual Output" icon="image">
    <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Tree-Delete.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=74a47ecb7d3930ba88538811c623c164" alt="Tree Delete" title="Tree Delete" className="mx-auto" style={{ width:"60%" }} width="445" height="235" data-path="images/Tree-Delete.png" />
  </Tab>
</Tabs>

<Warning>
  **This action cannot be undone.** Deleting a tree will permanently wipe its configuration from the database, including all assigned Base Roles, Linked Roles, and custom DM Notices configured for that tree. \
  *(Note: This does **not** delete the actual roles from your Discord server settings, it just unlinks them from the bot).*
</Warning>
