---
description: Moderate your server with a set of powerful commands!
---

# Moderation

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FztNco8A4Fs5aXPUFYqBA%2Fmoderation.png?alt=media&#x26;token=b3420d5c-b47b-4699-a07a-58547fc07adf" alt=""><figcaption></figcaption></figure>

The [Moderation](https://vyral.bot/dashboard/demo/module/ce84a76f-f0cc-42ce-8ebb-3790db06e943) module allows you to setup a highly customizable moderation system you can create for your server, with warnings, timeouts, auto-punishments and more features.

## Common Issues <a href="#common-issues" id="common-issues"></a>

Experiencing issues with the module? Check out the common issues below. If your issue is not listed in this page, make sure your module is updated to the latest version.

{% hint style="success" %}
It is advised that you [Enable Moderation Logging](#enable-moderation-logging) to make sure you can see details about possible errors.
{% endhint %}

### Roles not being added / removed <a href="#roles-not-being-added-removed" id="roles-not-being-added-removed"></a>

If the `/moderation role-add`, `/moderation role-remove` or `/moderation role-temp` commands are not working, it is likely because the role that you are trying to add or remove is above the bot's role in your server settings. The steps below will most likely solve your issue:

1. Make sure your bot has the administrator permission in your server. You can check this by looking at the permissions from your bot's role.
2. Make sure the bot's role is at the top of the role list. If this is not the case, drag the role to the top.

### Users not being muted, kicked or banned <a href="#users-not-being-muted-kicked-or-banned" id="users-not-being-muted-kicked-or-banned"></a>

If the `/moderation mute-add`, `/moderation kick`, `/moderation ban-add` or `/moderation ban-temp` command is not working, it is likely because the role of the target user is higher than the role from the bot. You are likely to solve this with the steps below:

1. Make sure your bot has the administrator permission in your server. You can check this by looking at the permissions from your bot's role.
2. Make sure the bot's role is at the top of the role list. If this is not the case, drag the role to the top.

{% hint style="danger" %}
If you are still experiencing issues with the module, join our [support server](https://discord.gg/support) to ask for further help.
{% endhint %}

***

## Settings <a href="#settings" id="settings"></a>

### Command Settings <a href="#command-settings" id="command-settings"></a>

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FMuR4KH0MT9lZBp3mDqHP%2Fcommandsettings.png?alt=media&#x26;token=4d3e3da8-934a-488c-bc73-502bf2743e30" alt=""><figcaption></figcaption></figure>

#### **Default Permissions**

If you have this enabled, users with the manage messages permission will be able to use moderator commands. Users with the administrator permission will be able to use admin commands.

#### **Admin Roles**

Here you can select one or more roles that you want to allow to use admin commands. Admin roles can access commands that are only meant for managing the server. Examples of these are: `/moderation role-add`, `/moderation role-remove`, `/moderation-role temp` and `/moderation clear-history` but those may not be all. You can view a list with all commands in [the commands section](#commands).

#### **Moderator Roles**

Here you can select one or more roles that you want to allow to use moderator commands. Moderator roles can only access commands meant for moderating the server, such as: `/moderation ban-add`, `/moderation case-view` and `/moderation warn`, but those are not all. You can view a list with all commands in [the commands section](#commands).

#### **Enable Moderation Logging**

When enabled, all moderation actions will be logged to a channel.

#### **Moderation Log Channel**

Here you can select the channel where you want to log moderation actions. _This setting only shows if you_ [Enable Moderation Logging](#enable-moderation-logging)_._

### Visual Settings <a href="#visual-settings" id="visual-settings"></a>

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2Fc1iLqOhU1W7b1R6RJfVD%2Fvisualsettings.png?alt=media&#x26;token=4e3d27a6-683c-4ff7-aef7-763617577738" alt=""><figcaption></figcaption></figure>

#### **Punishment Color**

Here you can select what color that you want to use for punishment messages. Punishment messages are sent to the channel where the punishment has been issued.

#### **Logging Color**

Here you can select what color you want to give to log messages. Log messages are sent to the moderation log channel, if enabled.

### Behaviour Settings <a href="#behaviour-settings" id="behaviour-settings"></a>

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2FdoL1hzj6FVQYBRUwA0Ar%2Fbehavior%20settings.png?alt=media&#x26;token=d0ff5122-32fa-450d-92bd-4b5b9d4036d8" alt=""><figcaption></figcaption></figure>

#### **Send Direct Messages**

Here you can select whether you want to send a direct message to the user that has been punished.

#### **Direct Message**

Here you can edit the message that a user gets after being punished. If the setting above has been disabled, the user will not get any direct message. You can use a set of variables in the direct message, you can read more about that [here](../variables). _This setting only shows if the_ [Send Direct Messages](#send-direct-messages) _setting is enabled._

#### **Ban: Delete Messages**

Here you can select whether or not you want to delete a user's messages when they have been banned from the server.

### Auto-Punishment Settings <a href="#auto-punishment-settings" id="auto-punishment-settings"></a>

<figure><img src="https://219320181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUFvHsoL9BBp2R9O7AfCe%2Fuploads%2Fh17DxB4U64ESTdTXg3HQ%2Fautopunishments.png?alt=media&#x26;token=0947cdb6-fc7d-4718-803c-89c899bd2d2e" alt=""><figcaption></figcaption></figure>

#### **Trigger Punishment Type**

In this selection, you can select what type of punishment should trigger the auto punishment.

#### **Warnings / Timeouts Needed**

This is the number of warnings or timeouts needed before the auto punishment is triggered.

**Punishment**

Here you can select the type of punishment that a user should get when they reach the amount of warnings / timeouts entered above.

#### **Timeout Duration**

This is the time a user should be timed out when they trigger an auto-punishment. _This setting is only shown if you selected "Timeout User" in the_ [_Punishment settings_](#auto-punishment-settings)_._

To save the punishment's settings, you need to click "Add" in the bottom-right corner of the settings. This will reset the fields so you can set up another punishment.

### Punishments <a href="#punishments" id="punishments"></a>

Here you can manage your currently active punishments. The same settings as [Auto-Punishments](#auto-punishment-settings) apply. You are able to edit / delete these punishments. A maximum of 10 punishments is present.

To save the edits you made on the punishment's settings, you need to click "Edit" in the bottom-right corner of the settings.

***

## Variables <a href="#variables" id="variables"></a>

Here are some module variables that can be used in [the direct message section](#direct-message).

| Variable      | Details                                                                                             |
| ------------- | --------------------------------------------------------------------------------------------------- |
| `{action}`    | This variable will show the type of punishment the user got. For example: warn, mute or ban.        |
| `{moderator}` | This variable will mention the moderator that gave the punishment.                                  |
| `{time}`      | This variable will show you the timestamp of the moment the punishment was issued.                  |
| `{case}`      | This variable will show you the ID of the moderation case.                                          |
| `{reason}`    | This variable will return the reason for the punishment, this reason was provided by the moderator. |

***

## Commands <a href="#commands" id="commands"></a>

Below you may find some information on each command of the module.

<details>

<summary>/admin</summary>

Category Command Base. Commands Coming Soon.

</details>

<details>

<summary>/bot dashboard</summary>

This command sends you a link to the dashboard of the bot

</details>

<details>

<summary>/bot documentation</summary>

This command sends you a link to the bots documentation

</details>

<details>

<summary>/bot help</summary>

This command offers assistance inside your server for the bot

</details>

<details>

<summary>/bot id</summary>

This command allows you to get the ID of the bot

</details>

<details>

<summary>/bot invite</summary>

This command allows you to invite the bot to another server

</details>

<details>

<summary>/bot nickname</summary>

This command allows you to change the Nickname of the bot

</details>

<details>

<summary>/bot ping</summary>

This command allows you to get the latency of the bot

</details>

<details>

<summary>/bot say</summary>

This command allows you to send a message with the bot

</details>

<details>

<summary>/moderation ban-add</summary>

This command allows you to ban a user from the server.

</details>

<details>

<summary>/moderation ban-remove</summary>

This command allows you to unban a user from the server on ID

</details>

<details>

<summary>/moderation ban-temp</summary>

This command allows you to temporarily ban a user from the server

</details>

<details>

<summary>/moderation case-remove</summary>

This command allows you to delete a moderation case

</details>

<details>

<summary>/moderation case-view</summary>

This command allows you to get the content of a moderation case

</details>

<details>

<summary>/moderation channel-lock</summary>

This command allows you to change the channel permissions so that no one can send messages anymore

</details>

<details>

<summary>/moderation channel-unlock</summary>

This command allows you to change the permissions in a channel back so that everyone can send messages again

</details>

<details>

<summary>/moderation clear-history</summary>

This command allows you to clear the punishment history of a user

</details>

<details>

<summary>/moderation kick</summary>

This command allows you to kick a user

</details>

<details>

<summary>/moderation mute-add</summary>

This command allows you to put a user in time-out

</details>

<details>

<summary>/moderation mute-remove</summary>

This command allows you to remove a timeout from a user

</details>

<details>

<summary>/moderation note-add</summary>

This command allows you to add a note to a user

</details>

<details>

<summary>/moderation note-remove</summary>

This command allows you to remove a note from a user

</details>

<details>

<summary>/moderation note-view</summary>

This command allows you to get the content of a note from a user

</details>

<details>

<summary>/moderation purge</summary>

This command allows you to delete up to 100 messages at the same time from a channel

</details>

<details>

<summary>/moderation role-add</summary>

This command allows you to add a role to a user

</details>

<details>

<summary>/moderation role-remove</summary>

This command allows you to remove a role from a user

</details>

<details>

<summary>/moderation role-temp</summary>

This command allows you to temporarily give a user a role, this role will be removed after a selected amount of time

</details>

<details>

<summary>/moderation role-view</summary>

This command allows you to view the roles of a user

</details>

<details>

<summary>/moderation slowmode</summary>

This command allows you to enable or edit the slow mode setting of a channel

</details>

<details>

<summary>/moderation user-nick</summary>

This command allows you to change the nickname of a user

</details>

<details>

<summary>/moderation user-history</summary>

This command allows you to view the punishment history of a user

</details>

<details>

<summary>/moderation voice-deaf</summary>

This command allows you to deafen someone in a voice channel

</details>

<details>

<summary>/moderation voice-undeaf</summary>

This command allows you to undeafen someone in a voice channel

</details>

<details>

<summary>/moderation warn</summary>

This command allows you to warn a user

</details>

<details>

<summary>/server info</summary>

This command allows you to get information about the server, such as the server name, member count, description and more

</details>

<details>

<summary>/vadmin modmail-ban</summary>

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>/vadmin modmail-clear</summary>

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>

<details>

<summary>/vadmin error-end</summary>

This command will end the error handling for a server. This is used by Vyral Staff only for error purposes only.

</details>

<details>

<summary>/vadmin error-start</summary>

This command will start the error handling for a server. This is used by Vyral Staff only for error purposes only.

</details>

<details>

<summary>/vadmin</summary>

This command is a base for the next commands in this section.

</details>

***

## Events <a href="#events" id="events"></a>

Below you may find some information on each event of the module.

<details>

<summary>Bot Nickname Handler</summary>

This event will prevent the bot nickname from being changed without authorization

</details>

<details>

<summary>Moderation Handler</summary>

This event will enforce [the auto-punish settings](#auto-punishment-settings)

</details>

<details>

<summary>Temporary Role &#x26; Ban Check</summary>

This event will make sure temporary roles or bans are removed on time

</details>
