Add custom protection
Catch repeated behavior and decide how the bot responds.
Use custom protection when you need to spot a pattern across messages or check a message's shape. Open AutoMod > Custom protection in the server's moderation settings. New filters start disabled so you can review them first.
- DetectChoose what to measure and the amount that triggers the filter.
- RespondChoose logging, a reminder, a warning, a punishment, or review.
- TestCheck the case in test mode, then enable live responses when ready.
Create a filter
Configure each filter for the selected independent server.
- Select Add custom filter.
- Enter a descriptive Filter name and choose Detect.
- Set the trigger amount for the selected measurement.
- For rolling filters, choose Time window in seconds.
- Optional: Add role, channel, or category exceptions.
- Choose a response, enable the filter, and select Save changes.
Rolling filters count activity per member across the server, rather than only inside one channel. A filter matches when its measured value reaches the configured amount.
Custom filters skip bot and webhook messages and members with Discord's Administrator or Manage Server permission. Use an ordinary member account when testing them.
Detection types
Choose the pattern you want to catch. A filter triggers when its measurement reaches the amount you set. Rolling filters count each member's activity across the server during the chosen time window; other filters check one message at a time.
Message rate
Count a member's messages during the time window.
Mention rate
Count mentions across a member's messages during the time window.
Link rate
Count HTTP and HTTPS links across a member's messages during the time window.
Duplicate messages
Catch repeated message text during the time window. Capitalization and
extra whitespace are ignored, so Hello everyone and HELLO EVERYONE
count as duplicate messages.
Similar messages
Catch messages with substantially overlapping words during the time window.
For example, changing cheap credits buy now to buy cheap credits now
still produces the same words. Similarity compares words, not meaning;
review real examples from your community before enabling punishments.
Attachments
Count attachments across a member's messages during the time window.
Images
Count image attachments across a member's messages during the time window. Links to image websites aren't image attachments.
Emoji
Count Unicode pictographs and Discord custom emoji across a member's messages during the time window. A visual emoji made of several Unicode characters can contribute more than one pictograph.
Stickers
Count stickers across a member's messages during the time window.
Capital letters
Measure the percentage of uppercase letters in one message. Messages with
fewer than 10 letters don't trigger this check. Set the amount as a
percentage, such as 80 for 80% uppercase letters.
Message length
Measure one message's text length after normalization. This checks text, not the size of an attached file.
Line breaks
Count line breaks in one message. Use this to catch messages stretched over many lines.
Repeated characters
Measure the longest run of the same character in one message. For example,
heyyyyyyyy contains a run of eight y characters.
Distorted text (Zalgo)
Count combining marks in one message after normalization. These are accents
that can stack above or below letters, producing text such as h̷̩̅͝e̶͝ͅl̴̟̈́l̶͖͒o̴͎͊.
Ordinary accented text can also contain combining marks, so test a threshold
that fits the languages your community uses.
Masked links
Count Markdown links that hide a destination behind clickable text in one
message. For example, [free gift](https://example.com) displays “free gift”
as the link label. This detects the link format; it doesn't establish that
the destination is unsafe or that the label is deceptive.
Spoilers
Count spoiler sections in one message. For example, ||hidden text||
contains one spoiler section. Each section must be on a single line.
Choose a response
Start with Log only while checking whether your filter catches the right behavior. Choose a warning or punishment when you're ready for a stronger response. The same response choices appear for connected native rules and the AI warning response.
| When this rule matches | Result |
|---|---|
| Log only | Record the incident without a warning or punishment. |
| Send a friendly reminder | Notify the member without adding a warning. |
| Add a warning | Add the chosen severity points under a warning policy and evaluate its steps. |
| Apply a punishment | Apply the configured timeout, kick, or ban directly. |
| Ask staff to review | Create a case that needs a staff decision. |
For warnings, choose a Warning policy and Severity points. For direct punishments, choose the action, timeout duration where relevant, Send a DM, and Notify staff.
Response cooldown separates repeated incidents from the same member and rule. It applies to incident creation across response modes. Delete a posted message when this rule matches is a separate choice; review that switch when choosing staff review. Custom and native Log only responses don't request posted-message deletion. AI category actions have additional behavior alongside the AI warning response.
Server-wide exceptions and the filter's own exceptions can skip matching roles, channels, or categories. These aren't native Discord rule exemptions or AI coverage lists; configure each protection layer where needed.
Update or remove filters
Expand a filter to change its fields or disable it. Remove filter removes it from your draft. Select Save changes to apply either change, or reset to keep the saved configuration.
Next steps
Choose warning steps or read a test case before going live.
Last updated on