Skip to main content
← Blog

August 27, 2026 · The Minely team

How to build an automod filter bot with AI (word rules, escalations)

Discord's built-in automod helps, but every established server ends up wanting its own rules: this word is fine here but not there, links allowed for regulars only, caps at 80 percent is a raid. A custom automod bot is that control panel, with the escalation ladder to back it up.

What an automod filter bot actually is

An automod filter bot screens messages against configurable rules: blocked words and phrases, link policies, caps and spam patterns, and mention floods. Violations get deleted with a warning, and repeat violations escalate through the moderation ladder automatically.

How it works under the hood

Each rule is data: type (word, regex, link, caps, mentions, spam-rate), pattern, action (delete, warn, timeout), and exceptions (channels, roles). The message pipeline checks rules in order with the strictest match winning. Escalation counts violations per member and applies the ladder (warn, mute, kick, ban) with case records so staff see exactly why each action fired.

The prompt that builds it

You do not have to write this yourself. A precise description is enough:

an automod bot with configurable word and link rules, caps and mention-flood detection, delete-with-warning actions, and escalation through warn mute kick ban

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

  1. Implement the rule pipeline with word and regex rules.
  2. Add link policies with role and channel exceptions.
  3. Build caps, mentions, and spam-rate detection.
  4. Wire delete-with-warning actions.
  5. Add escalation ladders with case records.

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 with deletion and warning only; auto-punishment after trust builds. Exceptions are the soul of the system — staff channels and veteran roles usually get relaxed rules. Review the false-positive log weekly at first; every bad rule costs a real member.

Tips that save you a rebuild

  • Log every action with the rule that fired; disputes die in one lookup.
  • Prefer warn-then-delete over instant timeout for borderline rules.
  • Test rules against your own chat history before enabling.
  • Keep the rule list short; ten good rules beat fifty noisy ones.

Questions people ask

Can rules be per-channel?

Yes — channel and category scoping per rule, with inheritance.

What about images and stickers?

Text-only OCR is overkill for most; a block-images-from-new-accounts rule covers the common abuse.

How do I add rules safely?

A dry-run mode that logs without acting, per rule, for the first days.

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.