August 22, 2026 · The Minely team
How to build an anti-raid bot with AI (join floods, lockdown)
Raids are not hypothetical: one night, a hundred fresh accounts arrive in a minute with names you cannot pronounce and intentions you can guess. An anti-raid bot is the difference between a five-minute cleanup and a server you have to rebuild. It watches the door so you do not have to.
What an anti-raid bot actually is
An anti-raid bot detects join floods — too many joins too fast, too many new accounts, too many similar names — and reacts automatically: slowing joins, locking the server down, and alerting staff with one-click controls to end it.
How it works under the hood
A rolling window tracks joins per minute and account ages. Crossing configured thresholds triggers escalation levels: warn (alert staff), guard (require verification for all new joins), lockdown (pause all joins and lock channels). New-account quarantine holds recent accounts in a review state regardless of floods. Staff get an alert message with buttons to lift or harden the response, and everything resets to normal on an all-clear.
The prompt that builds it
You do not have to write this yourself. A precise description is enough:
an anti-raid bot that detects join floods, locks down the server, quarantines new accounts, and alerts staff with a one-click unlock
Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.
Building it in the right order
- Implement join-rate and account-age tracking.
- Build escalation levels with distinct responses.
- Add the lockdown response with channel locking.
- Wire quarantine for new accounts with staff review.
- Create the staff alert with one-click controls.
The details that matter in production
In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.
Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.
Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.
Tuning it after the first build
Start conservative: warn at 10 joins/minute, guard at 20, lockdown at 40 or on account-age signals. False positives cost real members; tune thresholds to your normal join traffic plus a wide margin.
Tips that save you a rebuild
- Escalate in levels; instant lockdown on a busy Saturday is a self-own.
- Alert with context: join graph, account ages, and the threshold crossed.
- Auto-lift guard after quiet periods; stale lockdowns kill growth.
- Log every trigger with the evidence; tuning depends on that history.
Questions people ask
What about name-pattern detection?
Similar-name and zalgo detection adds a strong signal — ask for it as a follow-up.
Can it ban the wave automatically?
Auto-ban on high-confidence patterns (age + name + join time) with staff review after.
How do I test it safely?
A dry-run mode that alerts without acting, so you can tune against reality first.
Try the prompt above on a fresh project. You will see the plan, the code streaming in, and the repair loop finish the job — then a jar to download.
