Set up Discord moderation with AutoMod filters

Updated · 9 min read

The AutoMod module checks every message a member sends against up to ten rule filters, from spam bursts to blocked words, and removes what breaks them. This guide configures it from the dashboard and explains exactly what each filter counts, so you can predict what it will remove. It ends with one harmless test that does not disturb your members. AutoMod is a Pro module that new accounts can use during the 14-day Pro trial.

Start free, 14 days of Pro, no card

Before you start

  1. Know what AutoMod checks and what it ignores

    AutoMod reacts to new messages sent in your server. It skips messages from bots, and it skips every member who has the Manage Messages permission, so moderators and admins never trigger it. For everyone else it runs the enabled filters in a fixed order: spam, invites, links, caps, mentions, words, emojis, duplicates, newlines and zalgo. The first filter that matches handles the message and the rest are not checked, so one message produces at most one violation.

    Whatever action a filter is set to, the offending message is deleted first. The bot then posts a short notice that names the member and the filter, and removes that notice after five seconds. It stores the violation, applies the filter’s action and, if you chose a log channel, writes an entry there. Messages sent before you saved your settings are never scanned or removed.

  2. Enable AutoMod and review its defaults

    Open your bot, select the Modules tab and turn on Auto Moderation. Click the gear button titled Settings on its card, then choose your server in the Server selector; every value in the dialog belongs to that server only. Four status chips at the top, AutoMod Module, Log Channel, Mute Role and Escalation, show at a glance what is switched on.

    Enable Auto Moderation is the master switch for the server. Two filters are on from the start: Spam Detection, set to 5 messages within 5 seconds, and Mass Mention Filter, set to 5 mentions. Both use Delete Message. The other eight filters begin switched off. Keep that baseline for the first few days and add one filter at a time, so that when something is removed you know which rule did it.

  3. Choose an action for each filter

    Every filter card has an Enabled toggle and an Action with five choices. Delete Message only removes the message. Warn User also records an Auto-Mod warning case when the Moderation module is enabled on the same bot. Mute User adds your Mute Role if you picked one, or otherwise gives a Discord timeout, for the length of Mute Duration. Kick User and Ban User act only when Discord allows the bot to remove that member, and a ban also deletes the member’s messages from the previous 24 hours.

    Mute Duration is set in seconds, from 60 to 2,419,200, which is Discord’s 28-day timeout maximum, and defaults to 600 seconds, or ten minutes. A Mute Role needs the bot to have Manage Roles with its own role above the Mute Role; a timeout needs Moderate Members and a bot role above the member’s highest role. If those conditions fail, the message is still deleted and logged but nobody is muted. The bot lifts a Mute Role with a timer, so if it restarts during a mute, remove the role by hand.

  4. Tune the thresholds you enable

    A threshold triggers when a message reaches the number, not when it goes past it. Max Emojis defaults to 10, so a message with exactly ten emoji is removed; Max New Lines defaults to 6 line breaks. Spam Detection counts a member’s earlier messages inside the timeframe, so with the defaults the sixth message within five seconds is removed. Messages Threshold accepts 1 to 100 and its Timeframe 1 to 300 seconds. Mass Mention Filter adds user and role mentions together, and Max Mentions accepts 1 to 50.

    Caps Filter looks only at the letters A to Z. It ignores messages with fewer letters than Minimum Length, 10 by default, and otherwise triggers when uppercase letters make up at least Caps Percentage, 70 by default. Duplicate Text Filter compares a member’s messages after lowercasing them; with the default Duplicate Count of 3 and a 60-second timeframe, the third identical message within a minute is removed. Zalgo Text Filter has no settings and triggers on more than five stacked combining marks in one message.

  5. Word Filter uses the Blocked Words / Phrases list. A plain entry matches whole words in any letter case, so blocking cat does not remove a message about a category. An asterisk stands for up to 20 characters without a space, which catches simple spelling tricks. Patterns longer than 100 characters, with more than three asterisks or with two asterisks side by side are refused by filterword and skipped by the bot. From Discord, filterword adds an entry and turns the filter on when it is the first one, unfilterword removes it, and filterlist shows the list.

    Link Filter reads web addresses that begin with http or https. In Blacklist mode, the default, it removes links to domains under Blocked Domains (Blacklist). In Whitelist mode it removes links to any domain missing from Allowed Domains (Whitelist), but only once that list has an entry. A listed domain also covers its subdomains. Discord invites are left to Invite Filter, which catches discord.gg, discord.com/invite and discordapp.com/invite links. From Discord, denylink (alias blocklink) blocks a domain and turns Link Filter on, allowlink allows one without changing the mode, and linklist shows both lists.

  6. Add exemptions and a private log channel

    Each filter card has its own Exempt Roles and Exempt Channels. An exemption covers that filter only: exempting a promotion channel from Link Filter still leaves Spam Detection active there. Exemptions help where a rule would misfire, such as links in a self-promotion channel or emoji in an art channel. The amexempt command edits the same lists from Discord, taking the filter name, add or remove, role or channel, and then a mention.

    Pick the AutoMod Log Channel in the dashboard, or use amlog in Discord with a channel mention. Each entry shows the member, filter, action, channel and up to 1,024 characters of the deleted message, so keep it staff-only, because the log repeats whatever was filtered. None (logs disabled) turns logging off. Violations are also stored on the bot: the violations command lists a member’s 20 most recent with their total, and clearviolations (alias clearv) wipes that history.

  7. Escalate repeat offenders

    Auto-escalation applies a stronger action when one member collects several violations in a short time. Turn on Enable Auto-Escalation and set Violation Count, from 2 to 50 with a default of 3, Escalation Timeframe from 1 to 86,400 seconds with a default of 600, and Escalation Action: Mute, Kick or Ban. When the count is reached, the bot writes an escalation entry to the log channel if one is set, applies that action on top of the filter’s own action, and starts counting from zero again.

    Two details matter when you plan escalation. The count lives in the running bot’s memory, so a restart resets it, although the stored violations history stays. An escalation mute also lasts for the main Mute Duration, not the separate Escalation Mute Duration field. From Discord, amescalate takes a count, a timeframe such as 10m, an action and an optional duration, and amescalate followed by off switches escalation off again.

  8. Save, then test one harmless rule

    Click Save Settings and wait for Saved ✓. If the dialog says the settings saved but live sync to the bot runtime failed, restart the bot from its page and wait until it is online again. Then set up a test you can undo: add a nonsense word such as zebraflamingo to Blocked Words / Phrases, switch Word Filter on with Delete Message, save again, and confirm that the test channel and your test account have no exemptions.

    From the test account, send a message that contains the word. It should vanish, a notice should show for five seconds, and an entry should appear in the log channel. If nothing happens, check the test account’s permissions first, then Enable Auto Moderation, the Word Filter toggle and any exemptions. The automod command in Discord lists every filter as ON or OFF with its action, plus the log channel and mute role. Remove the test word afterwards.

  9. Plans and what happens after a trial

    AutoMod is part of Pro. The Free plan keeps the Moderation module for manual actions but does not include AutoMod. If your 14-day trial ends without an upgrade, AutoMod is switched off on your bots. Its saved settings are not deleted, and upgrading within 30 days of the trial ending switches the module back on. The AI Toxicity Analysis panel at the bottom of the dialog is a separate option that this guide leaves off; every rule filter above works without it.

Frequently asked questions

Why doesn’t AutoMod remove my own test messages?

AutoMod skips every member with the Manage Messages permission, which includes the server owner and most staff roles. Send the test from an account without that permission.

Can I use AutoMod on the Free plan?

No. AutoMod is a Pro module that new accounts can use during the 14-day Pro trial. The Free plan includes the Moderation module for manual moderation.

Can one message count as several violations?

No. The filters run in a fixed order and the first one that matches handles the message, so each removed message records a single violation.

Ready to configure your bot?

Start free, 14 days of Pro, no card