> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bleed.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Filters

> Configure message filters, exemptions, and filter points for your server.

## Overview

Filters punish messages that break your rules. Triggering a filter can also add
points to the member, and enough points trigger the punishments in your
escalation ladder.

Filter types: `caps`, `links`, `emoji`, `spoilers`, `musicfiles`, `massmention`,
`invites`, and `spam`. Words are handled separately with `/filter word`.

## Setting up a filter

Use `/filter setup` to configure a filter with a form.

> [!NOTE]
>
> Caps is used here as an example, other filters will also open a form. Other filters use the same form, except:
>
> * `invites` and `musicfiles` have no threshold.
> * `spam` adds a **Window (seconds)** field and only allows `delete` and `warn`.
> * `links` adds an **Allowed sites** field.

![Caps filter setup form](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/filters/setup-caps.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=e5dfffa2042643b87e46cb5762c6b418)

```javascript Syntax theme={null}
/filter setup type:<filter>
```

```javascript Example theme={null}
/filter setup type:caps
```

Use `/filter set` to turn a filter on or off. Leave `channel` empty to apply it
everywhere.

```javascript Syntax theme={null}
/filter set type:<filter> setting:<On|Off> channel:<channel> threshold:<number> punishment:<delete|warn|timeout|jail|kick|ban> duration:<duration>
```

```javascript Example theme={null}
/filter set type:caps setting:On threshold:30 punishment:delete
```

> [!NOTE]
>
> `duration` accepts values like `15m`, `1h`, or `7d`; see the
> [duration format](https://docs.bleed.bot/resources/syntax.md#formatting-a-duration). A jail with no
> duration lasts until the member is unjailed.

Use `/filter clear` to remove a filter's channel settings and `/filter config`
to view them. Leave `type` or `channel` empty to include everything.

```javascript Syntax theme={null}
/filter clear type:<filter> channel:<channel>
/filter config type:<filter>
```

```javascript Example theme={null}
/filter clear type:caps channel:#general
/filter config type:caps
```

## Filter defaults

| Filter | Default threshold | Default punishment |
| - | - | - |
| `caps` | 30 uppercase letters | Delete |
| `emoji` | 8 emojis | Delete |
| `links` | 1 link to a site that is not allowed | Delete |
| `spoilers` | 1 `\|\|` spoiler mark | Delete |
| `massmention` | 9 mentions | Ban |
| `spam` | 5 messages in the spam window | Delete |
| `invites` | None | Delete |
| `musicfiles` | None | Delete |

## Exempt roles

Members with an exempt role are ignored by that filter. Requires **Manage
Channels**. `type` also accepts `word`.

```javascript Syntax theme={null}
/filter exempt add type:<filter|word> role:<role>
/filter exempt remove type:<filter|word> role:<role>
/filter exempt list type:<filter|word>
```

```javascript Example theme={null}
/filter exempt add type:caps role:@Trusted
/filter exempt list type:caps
```

## Word filter

![Filtered and allowed words list](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/filters/word-list.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=8c2666f71ecbb4f2b9f74a66f09187d0)

| Command | Description | Permission |
| - | - | - |
| `/filter word add` | Add a word to filter (up to 60 characters). | Manage Server and Manage Channels |
| `/filter word remove` | Remove a word from the filter. | Manage Server and Manage Channels |
| `/filter word list` | View filtered and allowed words. | Manage Channels |
| `/filter word allow` | Allow a word through the filter (up to 60 characters). | Manage Server and Manage Channels |
| `/filter word unallow` | Remove an allowed word. | Manage Server and Manage Channels |
| `/filter word regex` | Add or remove a regex pattern (up to 260 characters). | Manage Server and Manage Channels |
| `/filter word reset` | Clear the legacy word list. | Manage Server and Manage Channels |
| `/filter word migrate` | Copy the legacy word list into Discord AutoMod. | Manage Server and Manage Channels |

## Links whitelist

Allow specific sites through the links filter. Requires **Manage Channels**.

```javascript Syntax theme={null}
/filter url allow url:<link or site>
/filter url disallow url:<link or site>
/filter url list
```

```javascript Example theme={null}
/filter url allow url:example.com
/filter url list
```

## Snipe

Hide filtered content from snipe. Requires **Manage Channels**.

```javascript Syntax theme={null}
/filter snipe type:<invites|links|images|word|files|music> setting:<On|Off>
```

```javascript Example theme={null}
/filter snipe type:links setting:On
```

## Filter points

Set how many points each trigger adds and which punishments members receive as
points build up. Points can expire after `1h` to `365d`, or never.

![Filter points setup form](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/filters/points-setup.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=3b77de8904695e34402c0c315c01d1d6)

For a server that hasn't set anything up, `/filter points setup` opens with these defaults:

| Field | Default |
| - | - |
| Escalation | Empty, so no punishments happen until steps are added |
| Points | Empty, so every filter is worth 1 and every punishment 0 |
| Points come from | Filter points only |
| Points expire after | `never` |
| Deleted messages add points | Off |
| Tell members their next punishment | On |

> [!NOTE]
>
> The sample text in the empty boxes is only a placeholder and isn't saved.
> Escalation example: `5 timeout 15m`, `10 jail 1d`, `15 kick`, `25 ban`.
> Points example: `caps 1`, `massmention 3`, `warn 1`, `mute 2`, `jail 4`.

| Command | Description | Permission |
| - | - | - |
| `/filter points limit` | Set the maximum points a member can build up (5–100; 25 by default). | Manage Server |
| `/filter points setup` | Open the points and escalation setup form. | Manage Server |
| `/filter points view` | View point values and their punishments. | Manage Channels |
| `/filter points member` | View a member's points. | Manage Messages |
| `/filter points clear` | Remove all or a specified number of a member's newest points. | Manage Messages |

> [!NOTE]
>
> Leave `amount` empty in `/filter points clear` to remove all of a member's
> points.

```javascript Syntax theme={null}
/filter points limit points:<5–100>
/filter points setup
/filter points view
/filter points member member:<user>
/filter points clear member:<user> amount:<1–100>
```

```javascript Example theme={null}
/filter points limit points:25
/filter points member member:@jonathan
/filter points clear member:@jonathan amount:2
```

![](https://mintlify.s3.us-west-1.amazonaws.com/bleed/images/security/filters/points-view.png)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.