How to Set Up Discord Server AutoMod Rules for Keyword Filtering
🔍 WiseChecker

How to Set Up Discord Server AutoMod Rules for Keyword Filtering

Discord AutoMod is a built-in moderation tool that automatically blocks or warns users when they send messages containing specific keywords. Without AutoMod, server moderators must manually review every message, which is slow and unreliable for busy servers. This article explains how to create keyword filtering rules using AutoMod, including blocklists, allowlists, and timeout actions. You will learn the exact steps to configure these rules in your server settings.

Key Takeaways: Setting Up Discord AutoMod Keyword Filters

  • Server Settings > AutoMod > Add Rule: Opens the rule creation wizard where you define keyword blocklists and actions.
  • Keyword Matching Types: Choose between exact match, partial match, or regex to control how Discord detects blocked words.
  • Action: Block Message or Send Alert: Blocking prevents the message from being sent; alerts notify moderators without blocking.

ADVERTISEMENT

What Discord AutoMod Keyword Filtering Does

AutoMod keyword filtering scans every message sent in your server against a list of words or phrases you define. When a match is found, AutoMod can either block the message entirely or send an alert to a designated moderation channel. This feature works in text channels, threads, and forum posts. It does not scan direct messages between users.

Prerequisites for using AutoMod keyword rules:

  • You must have the Manage Server permission.
  • Your server must be a Community server. If it is not, you can enable Community in Server Settings > Enable Community.
  • AutoMod is available on all server tiers, including free servers.

Each rule can contain up to 100 keywords. You can create up to 25 rules per server. Keyword lists support exact matches, partial matches, and regular expressions (regex) for advanced pattern matching.

Steps to Create a Keyword Filtering Rule in AutoMod

  1. Open Server Settings
    Right-click your server name in the channel list and select Server Settings. If you are on mobile, tap the server name at the top and choose Settings.
  2. Go to AutoMod
    In the left sidebar, scroll down to Moderation and click AutoMod. This opens the AutoMod dashboard where you can see existing rules.
  3. Click Add Rule
    Click the Add Rule button in the top-right corner. A new rule creation window appears.
  4. Name Your Rule
    Enter a descriptive name such as “Block Profanity” or “Filter Spam Links”. This name is only visible to moderators.
  5. Choose Keyword Matching Type
    Under Keyword Matching, select one of the following:
    Exact Match: Only blocks the exact word. For example, “badword” will not match “badword123”.
    Partial Match: Blocks any message containing the keyword anywhere. “badword” matches “badword123” and “mybadword”.
    Regex: Use regular expressions for advanced patterns, such as matching variations of a word like “b@dword”.
  6. Enter Your Keyword List
    Type or paste each keyword on a separate line. You can add up to 100 keywords per rule. For example:
    spam
    scam
    free nitro
    http://
  7. Set the Action
    Under Action, choose what happens when a keyword is detected:
    Block Message: The message is not sent. The user sees an error message indicating their message was blocked.
    Send Alert: The message is sent, but a notification is posted in a designated moderation channel. This is useful for reviewing borderline content.
  8. Select a Moderation Channel (for alerts)
    If you chose “Send Alert”, select a text channel where alerts will appear. It is best to create a private channel named #automod-alerts that only moderators can see.
  9. Add Exceptions (Optional)
    Under Allow List, enter any words that should be allowed even if they match the keyword pattern. For example, if you block “ass” but want to allow “class”, add “class” to the allow list.
  10. Choose Affected Channels
    Decide whether the rule applies to All Channels or Specific Channels. For testing, start with one channel.
  11. Review and Save
    Review your settings and click Save Rule. The rule becomes active immediately.

ADVERTISEMENT

Common Issues When Setting Up AutoMod Keyword Rules

Rule Does Not Block Messages

If a keyword is not being blocked, check the matching type. Partial match is the most comprehensive. Also verify that the rule is enabled and that the affected channels include the channel where the message was sent. If you have multiple rules with overlapping keywords, the most restrictive action (block) takes priority.

False Positives Blocking Legitimate Messages

When a rule blocks messages that should be allowed, add the false-positive word to the Allow List in the rule. For example, if you block “cash” but want to allow “cashback”, add “cashback” to the allow list. Use exact match for the keyword instead of partial match to reduce false positives.

AutoMod Does Not Show in Server Settings

AutoMod is only available on Community servers. To enable Community, go to Server Settings > Enable Community and follow the setup wizard. You must also have the Manage Server permission. If you still do not see AutoMod, ask the server owner to check your role permissions.

Keywords with Special Characters Not Detected

AutoMod does not automatically normalize special characters. For example, “b@dword” will not match “badword” unless you use regex. Use regex to match patterns with character substitutions. A regex pattern like b[a@]dword matches both “badword” and “b@dword”.

AutoMod Keyword Rule Types: Block Message vs Send Alert

Item Block Message Send Alert
Message visibility Message is not sent to the channel Message is sent to the channel
User notification User sees a red error banner No user notification
Moderator workload No manual review needed Moderators must review alerts
Best use case Obvious spam, profanity, or scams Borderline content that needs human judgment

You can now create keyword filtering rules in Discord AutoMod to automatically block unwanted messages or alert moderators. Start by adding a simple rule for common spam words and test it in a single channel. For advanced filtering, use regex patterns to catch variations of blocked words. Remember to review your moderation alerts regularly to adjust the allow list and reduce false positives.

ADVERTISEMENT