Moderation - Anti-Raid
Anti-raid gives your server a level: 0 is Normal, and you define up to 10 levels above it, each with protective actions. Raising the level applies every level up to it; lowering it undoes them. Staff change the level from the dashboard or with /antiraid level, and automation rules can raise it the moment a raid is detected.
Setting up levels
- Open Moderation > Anti-Raid and switch on Anti-Raid Protection.
- Click Edit Levels, then Add Level for each level (up to 10). Level 1 is the mildest.
- For each level, set a Level Name and any of these actions:
| Action | What it does | Bot permission |
|---|---|---|
| Lock Channels | Denies Send Messages to @everyone in the chosen text channels | Manage Channels and Manage Roles |
| Set Slowmode | Sets a slowmode delay (0 to 21600 seconds) on the chosen channels | Manage Channels |
| Notify Channel / Notify Role | Posts an "Anti-Raid Level Escalated" alert in the channel, pinging the role | Send Messages there |
| Verification Level | Raises Discord's verification level (Low, Medium, High or Highest). A server that is already stricter is left as it is | Manage Server |
| Block Invites | Pauses the server's invites, so nobody can join through an invite link | Manage Server |
| Restrict Joins | Kicks everyone who joins while the level is active | Kick Members |
| DM New Members | Sends your text (up to 2000 characters) as a DM to members who join while the level is active; with Restrict Joins, the DM goes first | none |
| Auto-Decay Override (minutes) | This level's own auto-decay delay; leave it empty to use the global value |
- Set Auto-Decay (minutes) (see below), then click Save.
Levels stack: level 2 applies level 1's actions and its own, and where two levels set the same thing (a verification level, a DM text) the higher level wins. Restrict Joins and DM New Members never touch the server owner, bots, or members at or above the bot's highest role.
Changing the level
- Dashboard: click a level under Set Level.
- Discord:
/antiraid level level:2sets it (level 0 is Normal)./antiraid statusshows the current level, when it changed and who changed it, and/antiraid historylists the last 15 changes./antiraid statusneeds the bot's Staff level, so moderators can check the level without being able to change it;/antiraid leveland/antiraid historyneed the Admin level. Discord shows the/antiraidcommands to members who can time out members (server admins can change that per command in the server's Integrations settings). - Automations: the Set anti-raid level action, for example on the Join raid detected trigger from Anti-Spam. A rule on When anti-raid level changes can react to any change, with the conditions Anti-raid level is and Anti-raid level is at least.
Every change is recorded in the staff log and posted to Mod Logs: as Anti-Raid Level Set by Staff when a staff member made it, or as Anti-Raid Level Changed Automatically when the bot did (a rule or auto-decay). Rules on When anti-raid level changes run after every change.
Lowering the level and auto-decay
Lowering the level undoes what the higher levels did: channels unlock, slowmodes go back to their previous delay, invites resume and the verification level returns to what it was before anti-raid raised it. The original settings are saved with the configuration, so a restart in between loses nothing.
With Auto-Decay (minutes) above 0 (at most 10080, one week), the level drops by one each time that many minutes pass without a change; 0 turns it off (the default). A level's Auto-Decay Override replaces the global value for that level, and an override of 0 keeps that level until someone lowers it. A raid that escalates again resets the clock.
Turning Anti-Raid Protection off while a level is active first lowers the level to Normal, so nothing stays locked.
Warning
Without auto-decay, a raised level stays until someone lowers it. A level that restricts joins or blocks invites keeps turning real members away, so lower it when the raid is over.
When Discord refuses an action
If the bot lacks a permission for an action, the level still changes and the other actions still run. The bot posts what it could not do to the level's notify channel (or the nearest lower level's), once per level change.