Add or Edit an AutoMod Rule

Make Discord itself block messages with certain words.

Adds, edits or deletes a keyword rule in your server's AutoMod. Discord checks every message against it, even while your bot is offline.

The AutoMod rule settings, with Which rule, Words to catch and What happens marked
  • A Which rule: Add a new rule (give it a name), Edit a rule or Delete a rule (pick it by its ID or exact name).
  • B Words to catch: up to 1,000. Use * for part of a word: bad* catches "badly". A variable can hold several words, separated by commas. Below this, add words it should never catch.
  • C What happens, pick at least one:
    • Block the message, with an optional line telling the member why.
    • Send an alert: posts a copy of the message in a channel for your staff.
    • Time them out for up to 28 days.

Further down you can switch the rule on or off, pick roles and channels it ignores, and name a variable to keep the rule's ID for later.

When editing, choose whether new words are added to the rule, removed from it or replace its list. Turning on any action replaces what the rule does now. Leave them all off to keep its actions.

The bot needs Manage Server, plus Moderate Members to time people out.

Success and error paths

Turn on Enable Success/Error Handles to run different blocks when it works (green path) and when it fails (red path).