# Modmail

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

{% hint style="warning" %}
This module requires a [Premium Subscription](/premium/premium-and-priority-hosting-plans.md#premium-plans) to function.
{% endhint %}

The [Modmail](https://dashboard.botghost.com/dashboard/module/249b4aee-5617-4985-b60b-be262e567fc7/modmail) module allows users to send a Direct Message to your bot to open a form thread in a form channel of your choice to contact server staff privately, or report server members and more.

## Settings

### Settings

Here you can configure the settings for the modmail module, from changing the DM Messages to selecting the form channel you would like it to be posted in.

<figure><img src="/files/35Ww7chgrksKOifyzysz" alt=""><figcaption></figcaption></figure>

#### **Receive Requests**

This option is enabled by default and disabling this setting will stop users from opening a modmail thread and instead return a closed message when they direct message your bot.

#### **Form Channel**

Here you must paste your forum channels ID to allow users to open modmail threads, you can create a forum channel in your discord server, for a guide on how to get a channel ID you can check [here](/getting-started/standard-practices/advanced-practices.md#how-can-i-get-a-channel-id).

#### **DM Message Title**

This field is where you can edit the direct message title which is sent to users upon contacting your bot via direct messages.

#### **DM Message Description**

Here you can edit the message that is sent to the user upon contacting your bot via DMs. All [variables](/custom-commands-and-events/variables.md) may be used.

### Ban Command

This is where you can configure the settings for the `/modmail-ban` command.

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

#### **Enable Ban Command**

This toggle is where you can enable/disable the ability for staff to use the `/modmail-ban` command.

#### Select The Needed Permissions

This dropdown section is where you can change the permissions for use of the `/modmail-ban` command, the default value of this is set to **Administrator** but can be changed to:

| Permission     | Details                                               |
| -------------- | ----------------------------------------------------- |
| Administrator  | Requires the administrator permission in your server. |
| Server Manager | Requires the manage server permission.                |
| Moderator      | Requires the manage permissions.                      |

#### **Ban Message**

In this field, you can set the message that is displayed to a user when they attempt to make a modmail thread after they have been banned from using modmail.

***

## Commands

In this area, you can view and modify the commands of the Modmail module. Below you may find some information on each command of the module.

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

<details>

<summary>/modmail-ban</summary>

When triggered, this command will restrict a selected users ability to use the modmail system resulting in a ban message being displayed upon trying to open a new modmail thread.

</details>

<details>

<summary>/modmail-clear</summary>

When triggered this command will clear the modmail data for a user allowing them to use the modmail system again, this is useful incase the system breaks and acts as though a user has a thread already open.

</details>

## Events

In this area, you can view and modify the events of the Modmail module. Below you may find some information on each event of the module.

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

<details>

<summary>Modmail</summary>

This is the main event which detects when a user sends a DM to your bot and starts a thread. Here you can edit the event and customise it to your liking and add onto the pre-existing functionalities of the module.

</details>

***

{% hint style="danger" %}
It's advised that you do not edit the commands and events unless you have a good understanding of BotGhost and its Command Builder. If you encounter any issues, you might want to reset the module for it to work again as intended.

Additionally, a copy of the edited commands / events will be created if you update the module.
{% endhint %}


---

# 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://documentation.botghost.com/server-management/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.
