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

# Quick Setup Guide

> A step-by-step checklist to build your first tree and get Nocturne running in under 10 minutes.

This guide covers the high-level flow of setting up Nocturne. For detailed explanations of the mechanics behind these commands, click the links provided in each step.

<Steps>
  <Step title="Proper Setup & Permissions">
    Before running any commands, ensure Nocturne's role is placed **higher** in your server's role list than any roles it needs to assign or remove.

    * **Required Permission:** `Manage Roles`
    * **Optional Permission:** `Manage Webhooks` (Required if you plan to use the logging system).

    <Tip>
      *Make sure to you have gone through our [Before You Start](/guide/before-you-start) Guide to have a better understanding.*
    </Tip>
  </Step>

  <Step title="Create a Tree">
    A "Tree" is the container for your hierarchy. Consider it as a promotional pathway or a ladder. You can create as many trees as you need (e.g., one for Moderation, one for Events).

    ```text Command theme={null}
    /tree create <name>
    ```

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

    <Note>
      *Want to dive deeper into managing trees? Check out the [Tree Basics](/commands/tree/basics) page.*
    </Note>
  </Step>

  <Step title="Add Base Roles to the Tree">
    Base roles dictate the actual rank of the staff member. \
    The `position` parameter dictates the hierarchy level, where **1 is the lowest rank**. If left blank, it defaults to the highest available position.

    ```text Command theme={null}
    /tree role add <tree> <role> [position]
    ```

    ```text Example theme={null}
    /tree role add tree:Moderation role:@Trainee
    ```

    <Note>
      *Curious about how position math and hierarchy levels are calculated? Read the [Base Roles Guide](/commands/tree/base-roles).*
    </Note>
  </Step>

  <Step title="Add Linked Roles (Optional)">
    Linked roles are cosmetic or secondary roles (such as Staff Lounge Access, Raid alert, Ban Permission role) that are automatically assigned or removed alongside a base role.

    ```text Command theme={null}
    /tree linked-role add <tree> <base> <role>
    ```

    ```text Example theme={null}
    /tree linked-role add tree:Moderation base:@Moderator role:@Raid Alert
    ```

    <Note>
      *Discover how to automate linked role assignments in the [Linked Roles Documentation](/commands/tree/linked-roles).*
    </Note>
  </Step>

  <Step title="View Your Tree">
    Verify that your base roles, positions, and linked roles are configured correctly by viewing the tree layout.

    ```text Command theme={null}
    /tree view [tree]
    ```

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

  <Step title="Configure an Umbrella Role (Optional)">
    An Umbrella Role is a single server-wide role that Nocturne automatically gives to every active staff member across all trees and removes when they no longer hold any staff position.

    ```text Command theme={null}
    /config umbrella set <role>
    ```

    ```text Example theme={null}
    /config umbrella set role:@Staff
    ```

    <Note>
      *Need to know how this role will work? Check out [Umbrella Role Guide](/commands/config/umbrella-role).*
    </Note>
  </Step>

  <Step title="Configure Server Flags">
    Nocturne has three major behaviour flags you can toggle to fit your server's needs.

    * `Instant Fire`: Allows firing a member directly from a higher position without having to demote them step-by-step first.
    * `Persistence`: Keeps linked roles assigned from previous (lower) base roles when a user is promoted.
    * `DM Messages Default`: A global toggle that sets whether DM notices are sent to users by default.

    ```text Command theme={null}
    /config flags
    ```

    Use the interactive menu provided to toggle each of the above-mentioned flags.

    <Note>
      *Need a deeper explanation of how these toggles affect your server? See the [Configuration Overview](/commands/config/overview).*
    </Note>
  </Step>

  <Step title="Set Up Predefined Reasons (Optional)">
    Predefined Reasons let you create a library of reusable reason texts that show up as autocomplete suggestions when running `/staff` commands.

    * `Instant Fire`: Allows firing a member directly from a higher position without having to demote them step-by-step first.
    * `Persistence`: Keeps linked roles assigned from previous (lower) base roles when a user is promoted.
    * `DM Messages Default`: A global toggle that sets whether DM notices are sent to users by default.

    ```text Command theme={null}
    /config reasons
    ```

    Use the interactive menu provided to add, edit, view, or delete reasons

    <Note>
      *Learn more in the [Predefined Reasons Guide](/commands/config/reasons).*
    </Note>
  </Step>

  <Step title="Whitelist Roles (Optional)">
    By default, only those with the `Manage Roles` permission can run staff commands. You can whitelist specific roles to allow them to Hire, Fire, Promote, or Demote.

    ```text Command theme={null}
    /config whitelist-role <role>
    ```

    ```text Example theme={null}
    /config whitelist-role role:@Recruiters
    ```

    <Note>
      *Learn how to delegate bot access without giving out full server rights in the [Whitelist Roles Section](/commands/config/whitelist-roles).*
    </Note>
  </Step>

  <Step title="Set Up the Log Channel (Optional)">
    Keep an audit log of every staff action taken by Nocturne. This requires the bot to have `Manage Webhooks` permissions in the target channel.

    ```text Command theme={null}
    /config log-channel set <channel>
    ```

    ```text Example theme={null}
    /config log-channel set channel:#staff-logs
    ```

    <Note>
      *Find out more about this in [Log Channel Guide](/commands/config/log-channel).*
    </Note>
  </Step>

  <Step title="Customise DM Notices (Optional)">
    Personalise the direct messages sent to users when an action is taken against them. You can set these globally, or uniquely per tree. Each action globally or for the tree gets its own custom message.

    ```text Command theme={null}
    /config dms edit <action> [tree]
    ```

    ```text Example theme={null}
    /config dms edit action:Promote tree:Moderation
    ```

    <Note>
      *To preview your messages and view the full list of placeholders you can use, head to the [DM Notices Guide](/commands/config/dm-notices) and the [Variables Cheat Sheet](/guide/variables-guide).*
    </Note>
  </Step>

  <Step title="Run Staff Commands!">
    Your bot is fully configured. You can now start managing your team using the core staff commands.

    ```text Command theme={null}
    /staff hire <user> <tree> [reason] [dm-user] [notes]
    /staff fire <user> <tree> <reason> [dm-user] [notes]
    /staff promote <user> <tree> [reason] [dm-user] [notes]
    /staff demote <user> <tree> <reason> [dm-user] [notes]
    ```

    ```text Example theme={null}
    /staff hire user:@ArcticFox tree:Moderation
    ```

    <Note>
      *Visit the [Staff Actions Page](/commands/staff-actions) to know more!*
    </Note>
  </Step>
</Steps>
