# /ban

Bot's command `/ban` is able moderators and administrators to ban users for a certain period or forever.

{% hint style="info" %}
Note. This command supports arguments! Read the following paragraphs for the details
{% endhint %}

{% hint style="success" %}
Note. This command supports "quiet" mode. In this mode, your commands will be deleted, and members of your chat will not see any notifications\
To use "quiet" mode add "q" before the command (like /qban instead of /ban)
{% endhint %}

## Configuration of the command

* Press the button "Chat settings" near the selected chat on the ["My Chats" page](https://fullyst.com/my_chats)
* Open "Moderation" settings by clicking the corresponding menu item
* Enable `/ban` command on the page

<figure><img src="/files/l9dDiPcsyhayzjokf07Z" alt=""><figcaption><p>Moderation settings</p></figcaption></figure>

## Command usage

{% hint style="info" %}
This command is available only for moderators and administrators in the chat
{% endhint %}

### Simple usage

Just send `/ban` as a reply to a message and the user will be banned and the message will be removed.

<figure><img src="/files/0CQxmwCpQlu0GFMq7SbR" alt=""><figcaption><p>How to ban user in the chat</p></figcaption></figure>

Or you may use the `/ban` command with one argument - the user mention:

<figure><img src="/files/jlrNRkjy7GcxBLpiQPE7" alt=""><figcaption><p>How to ban user by mention</p></figcaption></figure>

### Usage with arguments

Command `/ban` supports the following arguments:

* Length of the ban in minutes, hours, and days
* "No-delete" mark which prevents to deletion of the message from the banned user
* Reason - the reason that will be saved

#### Ban a user by the mention

`/ban <mention> <reason>`

Arguments for the /ban command in this case are:

* `mention` (required) - any valid user mention (just type @ and then mention any user in your chat by username or by name)
* `duration` (optional) - the period for which the user will be blocked. If not provided - the user will be banned forever\
  Xm - X **m**inutes\
  Xh - X **h**ours\
  Xd - X **d**ays
* `reason` (optional) - a reason for the ban will be saved and printed

#### Ban a user by reply

You can also ban a user by replying to their message with the ban command

`/ban <duration> <delete> <reason>`

Arguments for the /bane command in this case are:

* `duration` (optional) - the period for which the user will be blocked. If not provided - the user will be banned forever\
  Xm - X **m**inutes\
  Xh - X **h**ours\
  Xd - X **d**ays
* `delete` (optional) - if this argument is `no-delete`, the message you reply to won't be deleted
* `reason` (optional) - a reason for the ban will be saved and printed

Let's ban a user for 1 hour:

<figure><img src="/files/4qlv733SD6U8xuyvwg6E" alt=""><figcaption><p>How to ban user for 1 hour</p></figcaption></figure>

Now let's ban the user forever, but keep its message

<figure><img src="/files/QgywgpsY0rRKQ1gnA3F9" alt=""><figcaption><p>How to ban user forever but keep message</p></figcaption></figure>

Also, you may combine both arguments in any order. In the example below, we will ban the user for 5 days and keep its message

<figure><img src="/files/NgksFQEo7BeYlrcm83iR" alt=""><figcaption><p>How to ban user for five days and keep its messages</p></figcaption></figure>


---

# 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.fullyst.com/fullyst-bots-commands/ban.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.
