# Modmail

<figure><img src="/files/T2w7tkl8h2ToJXDSTXtD" alt=""><figcaption></figcaption></figure>

### Enabling Modmail

1. **Open Your Workspace**\
   Log in to the Panora Dashboard and select your workspace. Navigate to **Discord → Modmail** in the sidebar.
2. **Enable Modmail**\
   Go to the **Settings** tab, click **Configure**, and toggle **Enable Modmail** to activate Modmail for your server.
3. **Configure Modmail Settings**\
   Assign your **Staff Role**, optional **Admin Role**, **Ticket Category**, **Logs Channel**, and enable or disable reply commands.
4. **Deploy Modmail**\
   Once enabled, users can DM your bot to automatically create a private support thread.

***

### Configuration Breakdown

| Field               | Type    | Description                                      | Example / Default |
| ------------------- | ------- | ------------------------------------------------ | ----------------- |
| **Enabled**         | boolean | Whether Modmail is active                        | `false`           |
| **Staff Role**      | string  | Role with permission to view/respond to threads  | `@Support Team`   |
| **Admin Role**      | string  | Optional role with full access to all threads    | `@Management`     |
| **Parent Category** | string  | Discord category where threads are created       | `modmail-threads` |
| **Logs Channel**    | string  | Channel for Modmail logs (opened/closed threads) | `#modmail-logs`   |
| **Reply Command**   | boolean | Allow `!r` or `!reply` commands in threads       | `true`            |

***

### Modmail Flow

1. **User Opens Ticket:** A user DMs the bot.
2. **Thread Created:** A channel is automatically created in the Modmail category.
3. **Staff Handles Ticket:** Staff respond via reply commands or typing directly in the thread. Threads can be claimed or left unclaimed.
4. **Closing & Logs:** After resolution, staff close the thread. A transcript is automatically generated and sent to the logs channel. Thread metadata is saved for audit and history.

***

### Example Flow

**Scenario:**

* User `@prrent` DMs the bot:

  > “Hi, I am missing my rank.”
* They select the server from a dropdown.
* Panora creates a channel: `#modmail-prrent`
* Staff `@prrent` claims the thread and replies using `!r`.
* After the issue is resolved, staff click **Close Thread**.
* Transcript is sent to `#modmail-logs`.

***

### Permissions & Error Handling

* **Role-Gated Access:** Only assigned staff/admin roles can view threads.
* **Direct Messages:** Users must have DMs open to initiate Modmail.
* **Thread Tracking:** Full metadata and message history is stored for each thread.
* **Error Handling:** If DMs are blocked or configurations are invalid, Panora gracefully handles failures without breaking the bot.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panora.cc/workspaces/support/modmail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
