ESN Guardian › Guides
Anti-raid
A Discord anti-raid bot that learns your server
By ESN Systems, makers of ESN Guardian. Updated November 2, 2026.
A raid is dozens or hundreds of accounts joining at once to spam, post shock content or ping everyone. ESN Guardian's anti-raid spots the wave as it starts, holds it back, and unlocks your server again once it calms down. Here is what it checks, what it does, and how to set it up.
Anti-raid is included on every server. Setup takes about five minutes.
Add Guardian to DiscordGrade your server firstWhat makes a good anti-raid bot
A fixed rule like “lock if 10 people join in a minute” breaks both ways: it fires every time a big streamer sends people your way, and it misses a slow raid. A good anti-raid bot needs three things:
- A baseline. It should know what normal joins look like for your server.
- More than a counter. Raid accounts tend to look alike: brand new, no avatar, similar names, joining seconds apart.
- A calm way back. Locking is easy. Unlocking at the right time, without a mod awake at 4 AM, is the hard part.
What Guardian's anti-raid watches
- Your normal join rate. Guardian learns it over time and reacts to waves well above it.
- Account age. Waves of brand-new accounts stand out.
- Look-alike accounts. Similar names and missing avatars arriving together (
/botfarm,/alts). - Returning raiders. Accounts that come back after a raid are held instead of let straight in.
- Voice and stage raids as well as text.
What it does when a raid starts
- Locks or quarantines the wave. New joins are held back so they can't post while you look.
- Logs it clearly in your security log: how many joined, when, and what Guardian did.
- Unlocks when the wave is over, so normal members aren't stuck outside.
If you want to lock everything yourself, /safemode lockdown applies a preset in one command (invites only, read-only, staff-only or full), and a panic PIN lets trusted staff do it when the owner is offline.
Verification: stop raids before they start
The best raid is the one that never reaches your channels. Guardian's verify gate puts new members behind a captcha (math, image or emoji) or a short rules quiz, with age tiers that send brand-new accounts to staff for approval. The optional web check flags VPN, Tor and datacenter connections. See the Discord verification bot guide for the full setup.
Set it up
- Add Guardian and keep every permission ticked.
- Move its role up. Drag ESN GUARDIAN above the roles it should protect.
- Run
/guardian setupand pick a preset. - Tune it with
/raidand add a gate with/captchaor/gate. - Check your grade with
/audit run. A low Discord verification level or a channel where @everyone can make webhooks weakens any anti-raid setup.
Want to know where you stand first? Grade your server's security in 2 minutes →
Anti-raid vs anti-nuke
They solve different problems. Anti-raid handles outsiders flooding in. Anti-nuke handles someone already inside (a turned mod, a phished staff account, a hijacked bot) deleting or banning things. Most servers need both, and Guardian runs both. Read more about Guardian's anti-nuke.
Questions
What is a Discord anti-raid bot?
A bot that detects a raid, a flood of accounts joining at once to spam or ping, and stops it by locking the server, quarantining the new accounts or putting them behind verification.
Will anti-raid lock out real members?
Guardian learns your server's normal join rate and unlocks once the wave calms down, so a burst of real members is less likely to trigger it than a fixed rule would be. You can also tune it with /raid.
Does Guardian's anti-raid cost anything?
No. Every protection is included on every server. Premium is $1.99/month or $19.90/year and only changes the bot's name, avatar, banner and bio.
Do I still need Discord's own verification level?
Yes. Set it to Medium or higher. Guardian works on top of it, and its audit flags a low level.
Running your own Discord bot? ESN Hosting runs Discord bots 24/7, from $0.50/mo →