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

# Filter

> Block words, patterns, spam, and unwanted content automatically.

## Overview

Fluxer doesn't have built-in AutoMod, so misery checks every message itself. Block specific words and patterns, and switch on filters for spam, mass mentions, caps, links, invites, and more.

> [!NOTE]
>
> The server owner and members with **Administrator** are never filtered. Word and pattern commands need **Manage Channels** and **Manage Server**; the rest need **Manage Channels**.

## Blocked words

```javascript Syntax theme={null}
,filter add (word)
```

```javascript Example theme={null}
,filter add badword
```

Words match whole words only, so `ass` won't catch `class`. Use `*` as a wildcard to widen a match — `bad*` also catches `badly`.

| Command | What it does |
| - | - |
| `,filter remove (word)` | Unblock a word |
| `,filter list` | See every blocked word |
| `,filter reset` | Clear all blocked words |
| `,filter whitelist (word)` | Always allow a word, even if a blocked pattern would match it |
| `,filter exempt (role)` | Let a role skip the word filter |

### Patterns

For anything a word list can't express, add a regular expression:

```javascript Syntax theme={null}
,filter regex (pattern)
```

```javascript Example theme={null}
,filter regex \d{4}-\d{4}
```

Run the same command again to remove the pattern.

> [!NOTE]
>
> Patterns use a safe regex engine that can never freeze the bot, so lookarounds and backreferences aren't supported. Patterns can be up to 200 characters.

> [!WARNING]
>
> Blocked words and patterns only ever **delete** the message — the punishments below are for the filter types.

## Filter types

Each filter counts something in a single message and acts when it reaches the threshold.

| Filter | Counts | Default threshold |
| - | - | - |
| `massmention` | Mentions | 9 |
| `spoilers` | Spoilers | 1 |
| `musicfiles` | Music files | 1 |
| `spam` | Messages within 5 seconds | 5 |
| `caps` | Uppercase letters | 3 |
| `links` | Links | 1 |
| `invites` | Server invite links | 1 |
| `emoji` | Emojis | 10 |

```javascript Syntax theme={null}
,filter (filter) (on or off) (channel or all) $threshold (number) $do (punishment)
```

```javascript Example theme={null}
,filter caps on all $threshold 10 $do warn
,filter invites on #general $do delete
```

Leave the channel out (or use `all`) to cover the whole server. A channel's own setting wins over the server-wide one, and threads follow their parent channel.

### Punishments

| Punishment | Result |
| - | - |
| `delete` | Deletes the message — the default |
| `warn` | Deletes it and records a warning |
| `jail` | Deletes it and jails the member |
| `kick` | Deletes it and kicks the member |
| `ban` | Bans the member |

Members are DMed when they're warned, jailed, kicked, or banned (at most once a minute per filter), and the action is recorded as a case.

> [!WARNING]
>
> `jail` needs your moderation system — run `,setup` first.

### Exempting roles

```javascript Syntax theme={null}
,filter (filter) exempt (role)
```

```javascript Example theme={null}
,filter links exempt @Moderator
```

`,filter (filter) exempt list` shows who's exempt from that filter.

### Allowing specific links

Keep the link filter on but let certain sites through in a channel:

```javascript Syntax theme={null}
,filter links whitelist (channel) (url)
```

```javascript Example theme={null}
,filter links whitelist #media https://fluxer.app
```

`,filter links list` shows every whitelisted link.

## Keeping things out of snipe

Stop certain content from showing up in `,snipe`:

```javascript Syntax theme={null}
,filter snipe (type)
```

```javascript Example theme={null}
,filter snipe invites
```

Types: `invites`, `links`, `images`, `word` (your blocked words), `files`, and `music`. Run it again to turn that type back off.


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