# Filters

### Filters are made to modify or block messages with malicious content or to apply certain RedisChat features

To disable a filter for a user set the permission <mark style="color:orange;">**`redischat.bypassfilter.filterName`**</mark>

{% code title="filters.yml" %}

```yaml
ignorePlayer:
  enabled: true
  priority: 4
  audienceWhitelist:
  - CHANNEL
  - PLAYER
  channelWhitelist:
  - public
  ignorePublicMessages: true
  sendWarnWhenIgnoring: true
```

{% endcode %}

## Priority

Filters will be applied to messages in order of priority starting from 1

## Audience Whitelist

There are 3 audiences inside RedisChat:

* CHANNEL -> Messages with a channel as receiver
* PLAYER -> Messages with a player as receiver (private messages)
* DISCORD -> Messages sent to Discord

#### If audienceWhitelist is empty the filter will be applied to all 3 the audiences

## Channel Whitelist

If the message is sent to a channel audience, the filter will work only for channels specified\
inside channelWhitelist

If channelWhitelist is empty, the filter will be applied to all channels

Remember: the "global" channel is called "public"

## Additional parameters

Every filter can have additional configuration


---

# 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://emibergo.gitbook.io/redischat/features/filters.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.
