# Ban/unban command

## Ban a user

To ban a user, you just need to run the command `/ban` and indicating, as in the example below, the user, the duration, the reason and a proof.

<figure><img src="/files/qJ9B2vRqHWVMMUmIfM6I" alt=""><figcaption><p>Example of the command <code>/ban</code></p></figcaption></figure>

{% hint style="warning" %}
The **duration**, the **reason** and the **proof** are not **obligatory** ! If you **don't specify** a reason or you **don't give** a proof, they will be **filled** as `none`. If you **don't specify** a duration, the ban will be **definitive**.
{% endhint %}

Once the command is run, the robot will do all the necessary checks to find out if the user can be banned from the server. If this is the case, this message will be resend to you.

<figure><img src="/files/qGES3BYa4q1l0Aai9WbN" alt=""><figcaption><p>Example of the command <code>/ban</code> response</p></figcaption></figure>

{% hint style="success" %}
**Congratulations**, you have just banned a user with **ProtectList** ! The **ban informations** will be **saved** by the bot and you will be able to **get** it.
{% endhint %}

## Unban a user

### With the button

You can unban a user with the button below the command response. You just have to click on the button and indicate the reason for the unban in the modal appearing, as below.

<figure><img src="/files/EUw85TzAqzCjQfkuuD8V" alt=""><figcaption><p>Example of the modal for deban a user from the button of the command <code>/ban</code></p></figcaption></figure>

When you click on the button `Submit`, the bot will send this message.

<figure><img src="/files/vh8Wsvx4E4wzx7CZZbBi" alt=""><figcaption><p>Example of the response for a deban of a user from the button of the command <code>/ban</code></p></figcaption></figure>

### With the command

The command is the same thing than the button. You have just to run the command `/unban` and indicating, as in the example below, the user ID and the reason.

<figure><img src="/files/7CBwCX0ZaHah8htigEdg" alt=""><figcaption><p>Exemple of the command <code>/unban</code></p></figcaption></figure>

When you execute this command, the bot will send this message :

<figure><img src="/files/HHOVD6TEuRMrY5ytN2Id" alt=""><figcaption><p>Exemple of the response for a deban of a user from the command <code>/unban</code></p></figcaption></figure>

{% hint style="success" %}
**Congratulations**, you have just unbanned a user with **ProtectList** ! The **unban informations** will be **saved** by the bot and you will be able to **get** it.
{% 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://docs.protectlist.xyz/moderation-module/ban-unban-command.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.
