> For the complete documentation index, see [llms.txt](https://natorog.gitbook.io/zelchat/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/zelchat/chat-filters/chatrules.md).

# ChatRules

***

<figure><img src="/files/PI05z66BOATaBQlitUgO" 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
```
