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

# AntiRaid

> Protection against raid attempts and suspicious joins.

# AntiRaid

AntiRaid protects your server from mass joins, suspicious accounts, and raid attempts. It provides join rate limiting, account age checks, default avatar checks, lockdown, and more.

## Features

* **Mass Join Protection**: Detects and blocks mass joins.
* **Account Age Check**: Blocks new accounts from joining.
* **Default Avatar Check**: Optionally blocks users with default profile pictures.
* **Punishment System**: Ban, kick, timeout, or jail detected raiders.
* **Lockdown System**: Automatically or manually lock the server during a raid.
* **Logging**: Sends detailed logs to a configurable channel.
* **Whitelist**: Exempt trusted users from anti-raid actions.

## Requirements

* Bot must have permissions: Administrator, Ban Members, Kick Members, Moderate Members, Manage Channels, Send Messages, Embed Links.

## Setup

### Enable/Disable AntiRaid

```bash theme={null}
,antiraid toggle
```

Toggles the anti-raid system on or off.

### Configure Mass Join Protection

```bash theme={null}
,antiraid massjoin on --threshold 5 --do ban --lock true --punish true
```

* `--threshold` — Number of joins in 60s to trigger
* `--do` — Punishment (ban/kick/timeout/jail)
* `--lock` — Lock channels on trigger
* `--punish` — Punish new members on trigger

### Account Age Protection

```bash theme={null}
,antiraid newaccounts on --threshold 7 --do ban
```

* Blocks accounts newer than 7 days

### Default Avatar Protection

```bash theme={null}
,antiraid avatar on --do kick
```

* Blocks users with default profile pictures

### Set Raid Punishment

```bash theme={null}
,antiraid punishment ban
```

* Options: ban, kick, timeout, jail

### Lockdown

* Enable/disable lockdown:
  ```bash theme={null}
  ,antiraid lockdown on
  ,antiraid lockdown off
  ```
* Optionally specify a role:
  ```bash theme={null}
  ,antiraid lockdown on @role
  ```

### Set Log Channel

```bash theme={null}
,antiraid setlogchannel #raid-log
```

### Whitelist Management

* Add user:
  ```bash theme={null}
  ,antiraid whitelist add @user
  ```
* Remove user:
  ```bash theme={null}
  ,antiraid whitelist remove @user
  ```
* List whitelisted users:
  ```bash theme={null}
  ,antiraid whitelist list
  ```

### View Settings

```bash theme={null}
,antiraid view
```

Shows all anti-raid settings and configuration.

## Example Usage

```bash theme={null}
,antiraid toggle
,antiraid massjoin on --threshold 5 --do ban --lock true --punish true
,antiraid newaccounts on --threshold 7 --do ban
,antiraid avatar on --do kick
,antiraid punishment jail
,antiraid setlogchannel #raid-log
,antiraid whitelist add @TrustedUser
,antiraid view
```

## Best Practices

* Set up a log channel for raid alerts.
* Use thresholds that match your server's size and activity.
* Whitelist trusted users and bots.
* Test the system before going live.

<Warning>
  Lockdown will modify channel permissions. Test in a safe environment first.
</Warning>
