# 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
```


---

# 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://natorog.gitbook.io/chat-filters/chatrules.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.
