# Filter Words

{% hint style="info" %}
Replace \[prefix] with your server's prefix.
{% endhint %}

Words are filtered by utilizing Discord's automod feature. serenity will create an automod for your server and add to it for each word you filter. It is important that you **do not** delete this rule, all of your filtered words will be lost.

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2FGL4PlCdUFRghCBHJk953%2Fimage.png?alt=media&#x26;token=4b06ad2b-4e7d-4d1a-a04d-6fce6dc015cf" alt=""><figcaption></figcaption></figure>

## Add a filtered Word

You can create a filtered word by using the following command:

```
// Syntax
[prefix]filter words add [word]

// Example
;filter words add naughty
```

Once you have created a word filter, serenity will send an embed confirming the word creation.

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2FuuMG7Z1sCFNuEVIk0QDc%2Fimage.png?alt=media&#x26;token=250bfbaf-67df-4985-85aa-a1e14a7ffbe4" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Users with Admin and Manage Server permissions are always exempt from filter rules. This is a Discord feature, we can't change this.
{% endhint %}

## Whiteliste & Unwhiteliste

You can whitelist and unwhitelist certain channels from being triggered by Discord's automod.

## Whitelist Channels

You can allow filtered words to be sent in certain channels. To do this, run the following command:

```
[prefix]filter words whitelist [channel]
```

Once you run that command, users will be able to send your filtered words in the channel specified. serenity will send a confirmation message telling you that it has whitelisted that channel.

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2Fsyn2GLgWxU1hEGeN4DhJ%2Fimage.png?alt=media&#x26;token=cadf36ba-2f4f-49d2-9c0b-28c9b5f3de6c" alt=""><figcaption></figcaption></figure>

#### **Already Whitelisted**

If you get a message saying "This channel is already exempt", it means what it says. The filter for filtered words does not apply for that channel. Read [Unwhitelist Channels](#unwhitelisting-channels) to learn how to disable this.

## Unwhitelisting Channels

You can unwhitelist a whitelisted channel to disallow members from sending filtered words in that channel. To do this, run the following command:

```
[prefix]filter words unwhitelist [channel]
```

Once you run that command, users will no longer able to send invites in the channel specified. serenity will send a confirmation message telling you that it has unwhitelisted that channel.

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2F9hEqxNgjnyMRBgG0qdS8%2Fimage.png?alt=media&#x26;token=2c38137e-3163-4b19-8879-1c8f297a3c66" alt=""><figcaption></figcaption></figure>

#### **Not Whitelisted**

If you get a message saying "This channel is not whitelisted", it means what it says. The filter for filtered words is already enabled in that channel. Read [Whitelist Channels](https://docs.pretend.best/security/filter/filter-words#whitelist-channels) to learn how to enable this.

## Whitelisted Channels

You can get a list of all whitelisted channels by using the following command:

```
[prefix]filter words whitelisted
```

**No exempted channels**

If you get a message saying "No exempted channels for invites filter", it means what it says. The filter for filtered words applies for all channels. Read [Whitelist Channels](#whitelist-channels) to learn how to whitelist channels from the filter.

## Remove a filtered Word <a href="#remove-a-filtered-word" id="remove-a-filtered-word"></a>

You can remove a filtered word from serenity's chat filter by using the following command:

```
// Syntax
[prefix]filter words remove [word]
// Example
;filter words remove docs
```

Once you run this command, serenity will send an embed confirming it removed the word from the chat filter.

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2F0kJlgFKyM1p1qEE6BRC2%2Fimage.png?alt=media&#x26;token=c31eb695-5d3c-4adc-a29c-36eece52aacd" alt=""><figcaption></figcaption></figure>

#### **Not in the Filter**

If you get a message saying "The word \[word] is not in the word filter list", it means what it says. The word specified is not in the filtered word list. To create one, read [Add a Filtered Word](#add-a-filtered-word).

## Clear the wordlist Filter

You can remove all words from the word filter by using the following command:

```
[prefix]filter words clear
```


---

# 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://docs.serenity.wtf/security-setup/automod/filter-words.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.
