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 first

What 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:

What Guardian's anti-raid watches

What it does when a raid starts

  1. Locks or quarantines the wave. New joins are held back so they can't post while you look.
  2. Logs it clearly in your security log: how many joined, when, and what Guardian did.
  3. 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

  1. Add Guardian and keep every permission ticked.
  2. Move its role up. Drag ESN GUARDIAN above the roles it should protect.
  3. Run /guardian setup and pick a preset.
  4. Tune it with /raid and add a gate with /captcha or /gate.
  5. 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 →

More guides