How to Protect Your Discord Server From Raids
Protecting a Discord server from raids takes layers set up in advance. A verification level and captcha stop raid accounts from posting. Discord's Raid Protection and anti-raid scoring detect, punish, and lock out raids. AutoMod filters the rest. During a raid, run /lockall, pause invites, and let anti-raid work. Afterwards, undo punishments on real members and check the audit log.
What a Discord raid is
A raid is a coordinated wave of accounts joining a server to spam, harass, post scam links, or mass-mention until moderators give up. Many are automated: a script joins tens or hundreds of accounts through your invite, often within a minute or two, and posts the same payload in every channel. Some are human, organized in a raid server and pointed at yours.
Raids tend to be loud and fast, which helps the defender. The join pattern is usually easy to spot, and scripted accounts often share obvious traits: freshly created, default avatar, joining within seconds of each other. Discord's own Raid Protection watches for this, and a bot that scores joins can act while the wave is still arriving.
Before a raid: the settings that make raids pointless
1. Verification level High
Server Settings > Safety Setup > Verification Level (on a Community server, under DM and Spam Protection). High requires ten minutes of membership before posting, so a script that joins and posts straight away gets nowhere. A verified phone number skips every level requirement, so phone-verified raid accounts are not held back.
2. Discord's Raid Protection
Server Settings > Safety Setup > Raid Protection and CAPTCHA. Discord detects join raids with its own models. It sends Activity Alerts to the channel you pick and as push notifications. It also asks new joiners to complete a CAPTCHA for the next hour. It does not use your scoring rules, punish the accounts that joined, or lock channels. The layers below add that.
3. Raid-aware verification
With a verification gate, a raid account that joins still cannot post until it passes a check. That raises the cost of every account. New members receive an Unverified role, see only the verify channel, and must solve an image captcha or pass the web check. See how to set up verification.
Adaptive Verification, free on every plan, also compares joins with your server's normal pace. When a wave arrives, it sends more members to a check and posts a raid alert to the security log.
4. Anti-raid scoring with automatic lockdown
This layer acts on the wave itself. It is part of Premium. The free tier includes verification and Anti Bot Add.
Security Bot scores each join. It adds points for a young account, for joining seconds after the previous join, and for a missing avatar. A join that matches none of these adds only the normal-join score. Scores add up inside the reset window.
When the total reaches your limit, anti-raid times out or bans every account that joined in that window and scored above zero. It also locks the channels on your lock list for the duration you set, then reopens them as they were.
There are no presets in the dashboard. You enter each number yourself. These starting values are a reasonable place to begin:
| Situation | Score limit | Account age points | Join row points |
|---|---|---|---|
| You are being targeted now | 10 to 15 | 5 | 3 |
| Public server, normal growth | 20 to 30 | 3 | 2 |
| Large server with frequent legitimate join spikes | 40 to 50 | 2 | 1 |
Keep the Account age bypass on (it is on by default, at 120 days). Accounts older than the age you set skip scoring entirely and are never punished.
The normal-join score defaults to 2, and scores add up over a 20-minute reset window by default. So with a limit of 20, ten clean joins from accounts younger than the bypass age within 20 minutes reach it. Set the normal-join score to 0 if you do not want clean joins counted at all.
5. AutoMod for what gets through
For accounts that pass verification because a person solved the captcha, filters handle the payload. Discord's own AutoMod has Mention Spam (with mention-raid detection) and Spam Content rules. Mention Spam can also time the sender out.
On Premium, Security Bot's AutoMod page sets up those rules for you. It also adds Threat Link Guard, which deletes scam links after they are posted and can time out, kick, or ban the sender.
6. Log channels and moderator permissions
Assign a security log channel so the team sees the anti-raid lock and anti-nuke alerts as they happen. Also assign a moderation log channel, where anti-raid timeouts and channel locks are recorded with Security Bot as the moderator. Give at least two moderators the LockAll and UnlockAll commands on the Moderation page, so someone can freeze the server without needing Manage Channels on their role.
Set the verification level to High
Server Settings > Safety Setup (DM and Spam Protection on a Community server). New members wait ten minutes before they can post. Accounts with a verified phone number skip the wait, so treat it as one layer, not the whole defense.
Check Discord's Raid Protection
Server Settings > Safety Setup > Raid Protection and CAPTCHA. Pick an alert channel so Activity Alerts reach your staff.
Turn on Adaptive Verification
With Security Bot invited, turn verification on. Create the Unverified role and the verify channel with
/verification setup_roleand/verification setup_channel, or the buttons on the Verification page. Choose Adaptive: it tightens when joins spike. Raid accounts that do not pass stay in the verify channel.Command:
/verification enableEnable anti-raid scoring and lockdown
On the Anti-Raid page (Premium), set a score limit normal joins never reach in the 20-minute window. Each clean join adds 2 points by default, so the default limit of 200 is about 100 ordinary joins. Use 20 to 30 only with a normal-join score of 0. Choose Mute (safer while you tune) or Ban. Turn on Lockdown, pick lock channels, and keep or shorten the default 20-minute lock.
Set up the log channels
On the Logging page, assign a security log channel and a moderation log channel. The anti-raid lock and anti-nuke warnings and punishments go to the security log. Anti-raid timeouts and channel locks also appear in the moderation log with Security Bot as the moderator.
Give moderators lockall
On the Moderation page, grant the LockAll and UnlockAll commands so any online moderator can freeze the server.
Command:
/lockall
Recommended raid settings by server type
| Server | Verification level | Verification type | Anti-raid (Premium) | Extras |
|---|---|---|---|---|
| Small community, under 1,000 members | Medium | Adaptive on Relaxed, or one-click | Score limit 20 to 30 | Discord AutoMod Mention Spam and Spam Content rules |
| Public gaming or fan server, 1,000 to 20,000 | High | Adaptive on Balanced | Score limit 20 to 30, lockdown on, 20-minute lock (the default) | Security log, LockAll for two moderators |
| Crypto, NFT, marketplace, or 20,000+ members | High | Adaptive on Strict, or Web check with VPN and alt blocking | Score limit 10 to 15, lockdown on | Beast Mode on; Threat Link Guard and Recovery enabled on Premium |
Leave the staff channel off the anti-raid lock list in every case. The setup guide covers the anti-nuke side of the bot.
What happens during a raid
Take example values of 1 for a normal join, 3 for a young account, 2 for a rapid join, and 2 for no avatar, with a limit of 20. A scripted raid plays out like this:
- The first joins. Fresh, avatar-less accounts join seconds apart. The first scores 5 (no join came just before it). Each later one scores 7. The running total goes 5, 12, 19, 26 and reaches the limit on the fourth join.
- Punishment. Anti-raid times out or bans, depending on the punishment you chose, every account that joined in the current window and scored above zero. Ordinary members who joined in the same window are included unless the account-age bypass covers them.
- Lockdown. The channels on your lock list stop accepting messages for the lock duration and then reopen as they were. The security log gets an Anti Raid Lock entry, the moderation log gets a Channel Lock entry for each channel, and the owner gets a short DM. Your staff channel, which you left off the list, keeps working.
- The rest of the wave. Accounts that join after the limit was reached are punished as they arrive, until the total resets.
Compare that with a real join spike after a stream shout-out. Accounts older than your account-age bypass add nothing, and other clean joins add only the normal-join score, so the total climbs slowly.
If spikes like that still reach the limit, raise the limit or lower the normal-join score. If raids take too long to reach it, lower the limit. The Anti-Raid page shows the current score while you tune.
Common raid-defense mistakes
- Locking every channel, including staff. Moderators need somewhere to talk during the lock. Leave the staff channel off the anti-raid lock list.
/lockalllocks every text channel the bot can manage, so give your staff role its own Send Messages allow on the staff channel. - Giving new members a role on join. In practice any role skips the Discord verification level, and a role that is allowed into channels overrides the Unverified deny. The Unverified role should be the only thing a new join receives.
- Verification with nothing on the join side. The gate stops posting, not joining. Hundreds of accounts still fill the verify channel and the member list.
- Security Bot's role below staff roles. The bot can only act on accounts ranked below it. Drag it to the top, or a compromised moderator account is exempt from anti-nuke.
- Forgetting to resume invites. Invites paused under Server Settings > Invites stay paused until you turn them back on. Put it in the incident note.
Test the defense before you need it
- Join with an alt account. You should see only the verify channel until you pass the captcha.
- Have a moderator run
/lockon one channel with a short duration to confirm the command permission works, then/unlockit. - During quiet hours, run
/lockalland/unlockallonce and check that the lock and unlock entries appear in the moderation log. - Open the Beast Mode simulator and replay a nuke against your limits, because a raid that escalates through a compromised account becomes a nuke.
During a raid: the first two minutes
- Lock the server. Run
/lockall, which locks every text channel the bot can manage, or let anti-raid lock the channels on its list. The raid has nowhere to post. - Pause invites. Server Settings > Invites > Pause Invites, or the server name menu > Security Actions > Pause Invites for a timed pause of up to 24 hours. No new accounts can join while invites are paused.
- Let anti-raid punish the wave. On Premium, accounts that joined during the raid are timed out or banned automatically. Without it, select the raid accounts on the Members page and ban them together.
- Lower the score limit temporarily for the next hour if accounts are still getting through. Switch the punishment to Mute while it is low, because everyone who joined inside the window and scored is punished, including ordinary members.
- Turn on slowmode in busy channels as a backup if you cannot lock them. Only roles with the Bypass Slowmode permission skip it.
- Unlock once joins stop. Run
/unlockall, which reopens only the channels Security Bot locked. Resume invites, and keep the lower limit for a day.
Do not delete channels to stop a raid. It loses history and permission overrides that are painful to rebuild. Locking is reversible. Deleting is not.
After a raid
- Undo punishments on real members. Members who joined during the raid may be caught. Timeouts show in the moderation log as mutes by Security Bot with the reason "Anti Raid". Bans are not logged by the bot, so find them in Discord's audit log under the same reason. Unban them or remove the timeout. Anti-raid bans also lift after the punishment duration (7 days by default; 0 makes them permanent).
- Restore anything damaged. If a raider had permissions and deleted something, and Recovery was on (Premium), restore it from Recently deleted on the Recovery page or with
/recovery. - Tighten the settings that failed. If accounts posted before the lock, lower the score limit. If they posted after verifying, raise Adaptive's strictness or switch to the web check with VPN and alt blocking.
- Find the leak. Check where the invite was posted. Rotate the vanity URL or the public invite if it was shared in a raid community.
- Write it down. A short incident note in the staff channel prevents the same debate next time.
Raids from members who are already inside
Sometimes the raid is a moderator's account that was phished, or a member with permissions who turned. That is a nuke, not a raid, and it needs anti-nuke limits and Beast Mode rather than join scoring. Read what a Discord nuke is and how to prevent one.
Do this with Security Bot
Discord Anti Raid Bot: Score joins, punish the accounts that arrived in a raid, and lock chosen channels until the wave passes.
Security Bot is a Discord anti raid bot. It scores joins on account age, join speed, and missing avatar. At your score limit, it times out or bans everyone who joined in the raid window and can lock chosen channels. Part of Premium.
Frequently asked questions
How do I stop a Discord raid that is happening right now?
Run /lockall, pause invites under Server Settings > Invites (or Security Actions in the server menu), and let anti-raid punish the accounts that joined during the raid. Without anti-raid, bulk-ban the raid accounts from the Members page. Unlock when the joins stop.
Can Discord's built-in settings stop raids?
Partly. Raid Protection detects join raids, sends Activity Alerts, and asks new joiners for a CAPTCHA for an hour. The verification level and Pause Invites help too. They do not use your own scoring, punish the accounts that joined, or lock channels. A bot adds those.
What anti-raid settings should a public server start with?
Keep the default score limit of 200, or set the normal-join score to 0 and use 20 to 30. Keep lockdown and the account-age bypass on, and use Mute as the punishment until you have watched how your normal join spikes score. Every clean join adds 2 points by default, and a raid punishes everyone who joined inside the 20-minute window.
Will anti-raid ban my real members?
It can. When the score reaches the limit, anti-raid times out or bans every account that joined in the current window and scored above zero, including real members. Existing members are never scored, and accounts older than the account-age bypass are skipped. Choose Mute as the punishment if you want mistakes to be easy to undo. Bans lift on their own after the punishment duration (7 days by default).
Is anti-raid free in Security Bot?
Adaptive Verification, which checks more members during join spikes, and Anti Bot Add are free. Score-based anti-raid with automatic lockdown is part of Premium at $4.99 per month.
How long should the automatic lockdown last?
The default is 20 minutes, and you can set anything from 2 minutes to 3 days. The channels reopen on their own when it runs out. Scripted raids often finish joining quickly, and a moderator can run /unlockall earlier once joins have stopped.
How this guide was made: drafted with AI assistance, then checked against Security Bot's source code and Discord's official help articles. Spotted something out of date? Tell us in the support server.