# Настройка фильтра для нежелательных пользователей

Если у вас появились пользователи, которых вы не хотите допускать к сценарию, то можно настроить фильтр предобработки, чтобы бот игнорировал все сообщения от пользователя.

Для начала необходимо создать список в разделе "Пользователи", куда нужно добавить всех нежелательных пользователей.

{% hint style="info" %}
Подробнее о списках можно почитать [тут](/scenarii/deistviya/rabota-s-polzovatelem.md) :)
{% endhint %}

Далее в самом фильтре предобработки нам нужно добавить блок "Условие" и в нем проставить условие для наших пользователей.

<figure><img src="/files/8Tg4wWVsYO7jBRx4KXQ9" alt=""><figcaption></figcaption></figure>

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

Теперь нужно указать, что если наш пользователь состоит в таком списке, то он идет в блок "Прервать обработку сообщения", иначе наш пользователь не состоит в таком списке и идет в блок "Продолжить обработку сообщения".

<figure><img src="/files/PSE8CB4xk3bPKnzErqz2" alt=""><figcaption></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.smartbotpro.ru/scenarii/sobytiya-scenariya/filtr-predobrabotki/nastroika-filtra-dlya-nezhelatelnykh-polzovatelei.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.
