> For the complete documentation index, see [llms.txt](https://natorog.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://natorog.gitbook.io/chat-filters/chatrules.md).

# ChatRules

This is the most powerful filter in ZelChat

***

<figure><img src="https://915383071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkgPprrYnIJHMCcjNEdrD%2Fuploads%2FUFYaqwCbUu9SyI9AD7Oj%2Fchatfilter.png?alt=media&amp;token=31a1e70d-5b06-4932-895f-a9d1f9f06188" alt=""><figcaption></figcaption></figure>

***

### How does it work?&#x20;

Every time a player sends a message, ZelChat will analyze it in a unique and efficient way! \
Every message will go under 3 filtering phases to avoid possible bypasses.\
\
You can Fully customize the ChatFilter inside `chatfilter.yml` file.

```yaml
enabled: true
replacer: '*****'
cancel-message: false # If you want the message to be cancelled
broadcastStaff: true # If you want to broadcast the message to zelchat.staff.filtered
```

### How to add a new rule?

Generating and blocking words using Regexes may seem difficult, this is why we have implemented a useful command to help you quickly generate powerful rules!\
\
With `/zelchat regex <word>` you will be able to quickly generate a regex rule!\
Inside `chatfilter.yml` under `rules` you can add your new rule!

```yaml
  RULE_NAME:
    description: "PUT A FANCY DESCRIPTION HERE"
    regex: COPY THE REGEX FROM /zelchat regex command
```
