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

# ModMail

> Private member-to-staff messaging with thread logs, transcripts, and reply commands

ModMail gives your server members a private, structured way to contact your staff team. When a member DMs the Invaro bot, a thread channel is automatically created in a category of your choosing, where staff can read and respond. Every thread is logged with a full transcript that you can export.

***

## Overview

The ModMail page has three tabs:

* **Overview** — a summary of thread statistics and recent activity
* **Settings** — configure staff roles, channels, and reply behaviour
* **Logs** — browse and search all thread history with transcript viewer

***

## Setting Up ModMail

<Steps>
  <Step title="Open ModMail Settings">
    Navigate to **ModMail** in your portal dashboard and select the **Settings**
    tab.
  </Step>

  <Step title="Enable ModMail">
    Toggle **ModMail Enabled** to on. Until this is enabled, the bot will not
    respond to member DMs.
  </Step>

  <Step title="Configure staff roles">
    Under **Roles**, select your **Staff Roles** — members with these roles can
    view and reply to ModMail threads. Then select your **Admin Roles** — admins
    can also close, delete, and manage all threads.
  </Step>

  <Step title="Set a thread category">
    Under **Channels & Category**, select a **Thread Category**. New ModMail
    thread channels will be created inside this Discord category. Keep this
    category private so only staff can see it.
  </Step>

  <Step title="Set a log channel">
    Select a **Log Channel**. When a thread is closed, a transcript is
    automatically posted to this channel.
  </Step>

  <Step title="Configure reply mode">
    Enable **Reply Commands** so staff can reply to users using a prefix command
    (e.g. `!r` or `!reply`). Set your preferred **Reply Prefix** — it must be 1
    to 5 characters. The default is `!`.
  </Step>

  <Step title="Save">Click **Save Changes**. ModMail is now active.</Step>
</Steps>

***

## How Threads Work

When a member DMs the Invaro bot:

1. A new channel is created in your configured thread category.
2. The channel is named after the member and contains a summary of their account.
3. Staff with the configured staff or admin roles can see and reply to the thread.
4. The member receives a confirmation DM that their message was received.

Staff reply by typing the reply prefix followed by their message in the thread channel:

```
!r Thanks for reaching out! I'll look into this for you.
```

The bot forwards that message to the member's DMs, formatted as an embed with the staff member's name.

***

## Reply Mode

When reply mode is enabled, two commands are available inside any active thread channel:

| Command                   | Action                      |
| ------------------------- | --------------------------- |
| `{prefix}r {message}`     | Sends a reply to the member |
| `{prefix}reply {message}` | Alias for `!r`              |

The reply prefix can be changed in settings. A preview in the settings panel shows exactly how replies look to the member in their DMs.

***

## Closing Threads

Staff or admins can close a thread from within the thread channel. When closed:

* The channel is archived or deleted according to your configuration.
* A full transcript is posted to the log channel.
* The member receives a DM notifying them the thread was closed.

Admins can optionally provide a close reason, which appears in the log and is sent to the member.

***

## Logs & Transcripts

Open the **Logs** tab to browse all past and current threads.

**Filtering options:**

* Search by username
* Filter by status: **All**, **Open**, or **Closed**

Each log entry shows the opener's username, which staff member closed it, when it was opened, how long it was open, and its current status.

Click the **eye icon** on any log entry to open the transcript viewer, which displays the full conversation in a Discord-style chat layout — user messages on the left, staff replies on the right.

Click **Export** in the transcript viewer to download the conversation as a `.txt` file.

***

## Overview Tab

The Overview tab shows:

* **Total Threads** — all threads ever opened
* **Open** — currently active threads
* **Closed** — resolved threads
* **ModMail status** — whether the system is currently active
* **Recent Threads** — a quick list of the five most recent threads with status indicators

***

## Access Control

Only portal **Owners** and **Admins** can configure ModMail settings and view the Logs tab. The settings page will show an access-denied screen for users without the required role.
