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

# Antiraid

> A system that protects your server from raids and mass joins.

## Overview

Antiraid watches who's coming through the door. It's built around three independent modules — run all of them, or just the ones that fit your server.

> [!NOTE]
>
> Every command here requires the **Manage Server** permission.

> [!WARNING]
>
> A module has to be turned **off** before you can change its settings. If it's already running, misery tells you to disable it first rather than silently overwriting your configuration.

## Flags

Antiraid uses `$` flags. They go after the on/off toggle, in any order.

| Flag | Applies to | Purpose |
| - | - | - |
| `$do` | All modules | The punishment: `ban` or `kick` |
| `$threshold` | Mass join, new accounts | The number the module measures against |
| `$lock` | Mass join only | Whether channels lock during a detected raid (`on` or `off`) |
| `$punish` | Mass join only | Whether members joining mid-lockdown get punished (`on` or `off`) |

## Mass join detection

Triggers when too many accounts join in a short burst — what an actual raid looks like from the server's side.

```javascript Syntax theme={null}
,antiraid massjoin (on or off) $threshold (number) $do (punishment) $lock (on or off) $punish (on or off)
```

```javascript Example theme={null}
,antiraid massjoin on $threshold 10 $do kick $lock on $punish on
```

> [!NOTE]
>
> The threshold is measured **per 10 seconds**. A threshold of 10 means ten joins inside that window sets the module off.

### Lockdown

When `$lock` is on, hitting the threshold puts the server into lockdown and closes your text, voice, forum, and thread channels. Turning `$punish` on extends that to anyone who slips in while the lockdown is active.

Lockdown doesn't lift on its own. To end it:

```javascript theme={null}
,antiraid mode
```

That unlocks every channel and stops punishing new arrivals. `,antiraid state` does the same thing.

> [!NOTE]
>
> The lockdown survives restarts — misery remembers every channel it locked and restores each one exactly as it was.

## Avatar requirement

Catches accounts that join without a custom avatar, a common giveaway for throwaway alts.

```javascript Syntax theme={null}
,antiraid avatar (on or off) $do (punishment)
```

```javascript Example theme={null}
,antiraid avatar on $do kick
```

There's no threshold on this one — it's a straight yes-or-no check on each join.

## Account age

Blocks accounts created too recently to be trusted.

```javascript Syntax theme={null}
,antiraid newaccounts (on or off) $threshold (days) $do (punishment)
```

```javascript Example theme={null}
,antiraid newaccounts on $threshold 7 $do kick
```

> [!NOTE]
>
> The threshold is in **days**. Set it to 7 and any account younger than a week gets punished on join.

## Whitelisting members

Whitelisted members skip antiraid checks entirely.

```javascript Syntax theme={null}
,antiraid whitelist (member)
```

```javascript Example theme={null}
,antiraid whitelist financely
```

> [!NOTE]
>
> This command toggles. Running it on someone already whitelisted removes them.

To see who's on the list, run `,antiraid whitelist view`.

## Logging

Send antiraid's actions to a channel:

```javascript Syntax theme={null}
,antiraid logs (channel or off)
```

```javascript Example theme={null}
,antiraid logs #raid-logs
```

## Checking your configuration

```javascript theme={null}
,antiraid configuration
```

Shows which modules are live, your mass join threshold and lock/punish settings, your account age threshold, and how many members are whitelisted.


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