> For the complete documentation index, see [llms.txt](https://tchat.tect.host/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tchat.tect.host/blocked-words/configuration.md).

# Configuration

This module blocks words based on a configurable list and performs actions when they are blocked.

## General

```yml
modules:
  # Allows you to block or censor words from a list
  # It also detects similar words; for example:
  # If the word "hello" is blocked, "he llo" will also be blocked
  #
  # Blocked words module loaded from modules/blockedwords.yml
  blocked-words: true
```

* modules.blocked-words: Enable/disable the module

***

## Module

#### Action

```yml
# What to do when a blocked word is detected:
# - CENSOR: Replace only the matched characters with censor-char (partial)
# - CENSOR_ALL: Replace the entire message with censor-char repeated
# - BLOCK: Cancel the message entirely
action: CENSOR
```

* CENSOR: It censors ONLY the blocked word, for example:.\
  If you block "hello" and type "hellos," the result will be "\*\*\*\*\*s".
* CENSOR\_ALL: Censor the blocked word and the rest of the word.\
  If you block "hello" and type "hellos," the result will be "\*\*\*\*\*\*".
* BLOCK: Blocks the message when a blocked word is detected and sends a message.

#### Blocked Words

The list of all blocked words
