Skip to main content
The AutoMod cog provides automated content moderation powered by the OpenAI omni-moderation-latest model, supplemented by several rule-based detection engines.

Command

CommandDescription
/automod settingsOpens an interactive settings panel for the invoking guild.
The settings panel is a multi-page interactive UI with the following sections:
  • Toggle AI — Enable or disable AI scanning for the guild.
  • Thresholds — Configure score thresholds per category and set the timeout duration.
  • Keywords — Manage the keyword and regex blocklist.
  • Whitelists — Configure bypass roles and channels for AI scanning, invite blocking, and keyword blocking.

Detection Modules

AI Moderation (OpenAI)

Messages (text and images) are sent to the OpenAI omni-moderation-latest API and scored against 13 content categories. The score for each category is compared against configurable thresholds to determine the action taken. Text categories:
CategoryDefault notify threshold
harassment90%
harassment/threatening90%
hate90%
hate/threatening90%
illicit90%
illicit/violent90%
self-harm90%
self-harm/intent90%
self-harm/instructions90%
sexual90%
sexual/minors90%
violence90%
violence/graphic90%
Image-capable categories (scanned in both text and image context): self-harm, self-harm/intent, self-harm/instructions, sexual, violence, violence/graphic For each category, three independent thresholds can be configured:
  • Notify — sends an alert to the configured log channel.
  • Delete — deletes the flagged message.
  • Timeout — times out the author and (if delete is also off) deletes the message.
The most severe action triggered across all categories is applied. Higher tiers implicitly activate lower ones (if timeout fires, delete also fires; if delete fires, notify also fires). Thresholds can be set at the guild, network, or global scope and cascade accordingly.

Keyword and Regex Blocklist

Keywords and regex patterns can be managed via the settings panel under the Keywords tab. They bypass the API queue and are evaluated immediately on every message. Keyword matching supports wildcard syntax:
PatternBehavior
dogMatches the whole word “dog”
dog*Matches any word starting with “dog”
*dogMatches any word ending with “dog”
*dog*Matches “dog” anywhere in the message
bad phraseSubstring match (phrases containing spaces)
Regex patterns use Python re syntax and are matched case-insensitively. A per-guild keyword whitelist can be configured to exempt specific roles, channels, and channel categories from keyword and regex checking. Blocklists are scoped per guild, network, or global and are merged at evaluation time.

Invite Blocker

Detects Discord invite links (all common variants and shorteners) posted in the server. Invites to the server’s own guild are automatically allowed. Whitelisted roles, channels, and channel categories bypass this check. Default action: delete on detection.

Attachment Spam Detection

Tracks attachments (images, videos, files, and any other file type) sent by a member across multiple channels within a 5-minute sliding window. If the same attachment fingerprint (matched by filename and file size) appears in 2 or more distinct channels within the window, the member is flagged. Default action: delete on detection. Tracks URLs sent by a member across multiple channels within a 5-minute sliding window. If the same URL appears in 2 or more distinct channels within the window, the member is flagged. Default action: delete on detection.

Bio Bait Detection

Detects cross-channel lure spam such as “check my bio” or “link in bio”. Applies homoglyph normalization to catch bypass attempts (e.g. “bi0”, “l1nk 1n bi0”). Fires when the same member posts a matching phrase in 2 or more distinct channels within a 5-minute window. Default action: delete on detection. Timeout duration: 1 hour.

OCR Scam Detection

When available, image attachments are OCR-scanned and the extracted text is scored against a library of celebrity names, strong scam phrases, weak scam indicators, suspicious domains, and scam fragment patterns. A combined hard-evidence score and context score determines the action taken. Default action: configurable via the ocr_scam category thresholds.

IP Grabber Detection

Matches URLs against a list of known IP-logger and IP-grabber domains. Also follows redirect chains (up to 10 hops, 5-second timeout per hop) to detect grabbers hidden behind URL shorteners. Private IP addresses are excluded from redirect crawling. Default action: delete on detection.

Executable File Detection

Detects executable file attachments by extension and MIME type. Covers Windows, macOS, Linux, mobile (APK, IPA), and JVM (JAR) formats. Default action: delete on detection. Matches URLs against a list of known adult-content domains using the same redirect-following approach as IP grabber detection. Default action: delete on detection.

Message Spam Detection

Rate-based detection that fires when a member sends too many messages within a rolling time window, regardless of content. The count and window are configurable per scope. Default rate: 5 messages in 10 seconds. Default action: delete on detection.

Repeated Message Spam Detection

Rate-based detection that fires when a member sends the same message content too many times within a rolling time window. Content is fingerprinted (normalised and hashed) to catch minor variations. Default rate: 3 identical messages in 30 seconds. Default action: delete on detection. Rate-based detection that fires when a member sends too many link-containing messages within a rolling time window in the same channel, complementing the cross-channel link spam detector. Default rate: 3 link messages in 15 seconds. Default action: delete on detection.

Attachment Spam Detection (Rate-Based)

Rate-based detection that fires when a member sends too many messages containing attachments within a rolling time window in the same channel, complementing the cross-channel attachment spam detector. Default rate: 5 attachment messages in 30 seconds. Default action: delete on detection.

AutoMod Settings — Thresholds Panel

Accessible via Thresholds in the settings panel.
ButtonAction
Set Timeout DurationOpens a modal to set the timeout length applied when the timeout threshold is triggered. Accepts durations like 30m, 1h, 1d. Scoped to guild, network, or global.
Set Roles/ChannelsOpens selects to configure the ping role (notified on alerts), the AutoMod log channel, and the test channel.
Category ThresholdsOpens a sub-panel to view and override per-category thresholds. Has Text and Image tabs.
Reset Category OverridesClears all category threshold overrides for the current scope.

AutoMod Settings — Whitelists Panel

Accessible via Whitelists in the settings panel. Contains three sub-panels:
  • AI Whitelists — roles and channels exempted from AI moderation scanning.
  • Invite Whitelists — roles and channels exempted from invite blocking.
  • Keyword Whitelist — roles and channels exempted from keyword and regex blocking.
All whitelist configuration is guild-scoped only and does not cascade to other scopes.

Permission Requirements for /automod settings

Scope being configuredMinimum permission required
GuildAdministrator or the manage_automod guild mod grant
NetworkNetwork owner or bot owner
GlobalGlobally trusted or bot owner