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

# DM Notices

> Personalise the direct messages Nocturne sends to users when a staff action is taken against them.

Whenever a staff action is taken, instead of having to copy-paste the same message to every single user you hire, you can let Nocturne automate this using DM Notices.

These notices are strictly **action-based**. This means you can configure completely separate messages for Hires, Fires, Promotions, and Demotions.

***

<h2 id="fallback">
  The Fallback System
</h2>

Before configuring your messages, it is important to understand how Nocturne decides which message to send. When an action is executed, the bot checks for messages in this specific order:

1. First, it checks if you created a unique message for that specific action *in that specific tree* (e.g., a "Hire" message explicitly for the Moderation tree).
2. If no tree-specific message exists, it falls back to your server's global message for that action.
3. If neither is set, Nocturne uses its built-in default message.

We recommend you configure a server-global message at the very least.

***

<h2 id="dms-edit">
  Editing a Notice
</h2>

You can configure your messages using the edit command. This command does not ask you to type the message right away; instead, it generates an interactive menu.

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

<Tabs>
  <Tab title="Command" icon="code-simple">
    ```text Command theme={null}
    /config dms edit <action> [tree]
    ```
  </Tab>

  <Tab title="Without [tree] parameter" icon="circle-1">
    **If the `[tree]` parameter is skipped,** the message will be set for the server.

    ```text Example theme={null}
    /config dms edit action:Hire
    ```

    <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Config-DMs-Edit-Global.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=1fd293cfd2a474d01eb593e059b1b8f0" alt="DM Notice Panel: Global" title="DM Notice Panel: Global" className="mx-auto" style={{ width:"50%" }} width="522" height="408" data-path="images/Config-DMs-Edit-Global.png" />

    *This will bring up the menu to edit the **server-global** message for **Hire**.*
  </Tab>

  <Tab title="With [tree] parameter" icon="circle-2">
    **If the `[tree]` parameter is used,** the message will be set for that specific tree.

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

    <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Config-DMs-Edit-Tree.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=85176b8b3fd03478d9173703d0ebd24e" alt="DM Notice Panel: Tree Specific" title="DM Notice Panel: Tree Specific" className="mx-auto" style={{ width:"50%" }} width="552" height="413" data-path="images/Config-DMs-Edit-Tree.png" />

    *This will bring up the menu to edit the **Hire** message for the **Moderation** tree.*
  </Tab>
</Tabs>

***

<h3 id="dms-menu-modal">
  How the Interactive Menu Works
</h3>

Upon running the command, Nocturne will present you with two buttons:

* **<kbd>Edit Content</kbd>** button
  * Clicking this opens a Discord Modal where you can construct your message.
  * You can provide a **Title** (optional, max. 128 characters) and a **Description** (required, max. 2048 characters).
  * You can use variables like `{target.mention}` or `{reason}` here! *See the **[Variables Guide](/guide/variables-guide)** for the full list.*

<img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/DMs-Notice-Modal.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=9974291e1c2864376e7ad2403e66f7e3" alt="DM Notice Edit Modal" title="DM Notice Edit Modal" className="mx-auto" style={{ width:"44%" }} width="525" height="638" data-path="images/DMs-Notice-Modal.png" />

* **<kbd>Reset to Default</kbd>** button
  * Clicking this will immediately delete your custom configuration for this specific action/tree from the database.

<img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/DMs-Reset.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=478b2fee3d5d20e461d96b69dbe1bfa2" alt="DM Notice Reset" title="DM Notice Reset" className="mx-auto" style={{ width:"70%" }} width="678" height="240" data-path="images/DMs-Reset.png" />

<Warning>
  **Discord Limitation:** Discord's modals do not support native autocomplete for channel / user / role mentions or emojis. If you type `@` or `#`, no menu will appear. If you want to ping specific channels or users, or use custom emojis, you must use their raw ID formats. \
  *Check out Discord's official [Message Formatting Guide](https://docs.discord.com/developers/reference#message-formatting) to learn how to format these IDs properly!*
</Warning>

***

<h2 id="dms-test">
  Testing a Notice
</h2>

Because these messages rely heavily on dynamic variables, you probably want to see what they look like before accidentally sending a broken format to a user. The test command outputs a mock version of the DM directly into the channel you run it in, using some dummy data.

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

<Tabs>
  <Tab title="Command" icon="code-simple">
    ```text Command theme={null}
    /config dms test <action> [tree]
    ```
  </Tab>

  <Tab title="Without [tree] parameter" icon="circle-1">
    **If the `[tree]` parameter is skipped,** the server-global message will be tested.

    ```text Example theme={null}
    /config dms test action:Hire
    ```

    <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Config-DMs-Test-Global.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=91431f109e1f430adf965523f7025c0b" alt="DM Notice Test: Global" title="DM Notice Test: Global" className="mx-auto" style={{ width:"50%" }} width="698" height="342" data-path="images/Config-DMs-Test-Global.png" />

    <Note>
      If no server-global message is set for the specified action, it will display the built-in message.
    </Note>
  </Tab>

  <Tab title="With [tree] parameter" icon="circle-2">
    **If the `[tree]` parameter is used,** the tree-specific will be tested.

    ```text Example theme={null}
      /config dms test action:Hire tree:Event Team
    ```

    <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Config-DMs-Test-Tree.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=2f072f98fd821a46c699bda8c90bbcd2" alt="DM Notice Test: Tree" title="DM Notice Test: Tree" className="mx-auto" style={{ width:"50%" }} width="633" height="312" data-path="images/Config-DMs-Test-Tree.png" />

    <Note>
      If no tree-specific message is set for the specified action, it will display the server-global message for that action.

      <img src="https://mintcdn.com/nocturneidle/rKKUixGtrUsPbPeX/images/Config-DMs-Test-Fallback.png?fit=max&auto=format&n=rKKUixGtrUsPbPeX&q=85&s=4da6de7b042c4e1301dc4f2a6541843f" alt="DM Notice Fallback Example" title="DM Notice Fallback Example" className="mx-auto" style={{ width:"50%" }} width="673" height="322" data-path="images/Config-DMs-Test-Fallback.png" />

      *Here, since there is no configured **Hire** message for the **Moderation** tree, it displays the server-global message.*
    </Note>
  </Tab>
</Tabs>

***

<h2 id="overrides">
  Important Overrides & Flags
</h2>

As a final note, keep in mind that customising your messages does not force the bot to send them. Sending DMs is ultimately controlled by two toggles:

1. **The Global Flag:** If the **`DM Notices Default`** flag is enabled, Nocturne will send DMs by default. On the contrary, if disabled, Nocturne will not send DMs.
2. **The Command Override:** When executing a `/staff` command, the executor always has access to an optional `[dm-user]` parameter. This allows them to manually choose whether to send or suppress the DM on a case-by-case basis, completely ignoring the global flag mentioned above!

***

<h2 id="dms-status">
  Checking DM Notice Status
</h2>

If you ever want to check which DM Notices have already been configured, you can run the following commands:

* **`/tree view [tree]` (with the `[tree]` parameter)**
  * This will let you know if DM Notices have been configured for that specific tree.
* **`/config view`**
  * This will let you know if server-global DM Notices have been configured or not.
