Skip to main content

AI Detection

The AI Detection page provides configuration and monitoring for AI-powered message scanning. Access to this page requires the AI_DETECTION section permission, which is separate from SECURITY.

AI Detection is part of the Growth tier and higher. If your plan does not include it, the page shows an upgrade prompt with a link to Billing.

The header card holds the master controls:

  • An enable/disable toggle for AI Detection. When disabled, no messages are scanned and no tokens are consumed, and the configuration tabs are hidden.
  • A token usage readout showing this period's consumption against your total budget.
  • Manage and Buy tokens shortcuts to the Billing page.

When AI Detection is enabled, three tabs appear: Rules, Filters, and Server context.

Rules Tab​

The Rules tab is where you manage detection rules. A summary line at the top shows how many rules are active and paused, plus how many messages were caught in the last 24 hours and 30 days. A badge tracks your custom-rule count against your plan's limit.

Rule cards​

Each rule is shown as a summary card with:

  • The rule name, with a Built-in badge for the two built-in rules and a Modified badge if you have customized a built-in rule away from its default.
  • The scan type (Text, Image, or Text + Image) and the action it takes.
  • Recent activity -- when the rule last fired and how many messages it caught in the last 24 hours and 30 days.
  • An enable/disable toggle.

Click a card to open the rule editor.

The rule editor​

The rule editor opens as a side panel (a drawer) organized into sections:

  • What to detect -- pick the scan mode (Text, Image, or Text + Image), write the detection prompt (rules that scan both text and images get a separate prompt for each), and set the confidence threshold with a slider.
  • When caught -- choose the action the bot takes (Log Only through Delete & Ban) and, for timeouts, the timeout duration.
  • Where -- set the channel scope: All channels, Only scan these (an allowlist), or Skip these (an exclude list).
  • Categories the AI may assign -- optionally restrict the rule to specific threat categories. Leave it empty to allow any category.
  • Notifications -- toggle the DM to the user and an in-channel public notification.
  • Bypass -- toggle whether members with trusted roles are skipped by this rule.
  • Custom messages -- optional custom DM and public-notification text, with variables such as {guildName}, {reason}, {duration}, and {user}.
  • Skip short messages -- the per-rule minimum message length (see Skip short messages).
  • Test -- a paste-text tester (see Test panel).
  • Reset (built-in rules) or Danger zone (custom rules) -- restore a built-in rule's default prompt, or delete a custom rule.

Changes are committed when you save.

Skip short messages​

Turn on Skip short messages to set a minimum character count for this rule; messages with less real text are not scanned, which saves tokens on very short messages. The minimum is measured against the message text after known-safe links are stripped out, so a message that is mostly a link counts as short. Messages with image attachments are always scanned by image-capable rules regardless of text length.

Test panel​

The Test section lets you paste a sample message and see whether the rule would flag it before you rely on it. It shows a Would flag or Would pass verdict, the confidence score, the assigned category, and the AI's reasoning. A test runs a real scan, so it consumes tokens from your budget and is rate-limited.

Built-in rules​

Thrella ships with two built-in rules that cannot be deleted and do not count against your custom-rule limit:

RuleDefault stateScan typeDefault action
Scam & PhishingEnabledText + ImageDelete & Warn
Toxicity & Hate SpeechDisabledTextDelete & Warn

Built-in rules are fully customizable. When you change a built-in rule's prompt, a Modified badge appears, and a Reset control restores the default.

Custom rules​

Click Add custom rule to create a rule with your own prompt and settings. Custom rules have all the same options as built-in rules. The number you can create depends on your plan's maxAiRules limit; see Tier Limits.

When you open the "why was this flagged?" link on a scan in the Log, the matching rule's editor opens directly, so you can adjust the rule that produced the result.

Filters Tab​

The Filters tab holds global include/exclude filters that apply across all rules.

Patterns​

Two lists for regex include and exclude patterns. Type a pattern and add it; remove it with its delete button. A badge shows the total against the shared limit of 20 patterns. Exclude patterns take priority over include patterns.

Words​

Two lists for keyword include and exclude words, working the same way, with a shared limit of 50 words. Exclude words take priority over include words.

note

Include filters narrow scanning to only matching messages; exclude filters skip matching messages entirely. The per-rule minimum message length now lives on each rule (see Skip short messages), not on this tab.

Server context Tab​

The Server context tab has a single field (up to 500 characters) where you describe your server's purpose. This context is given to the AI so it understands what is normal for your community and produces fewer false positives. A template dropdown offers common starting points. The context is shared by all rules and can be referenced in prompts with {guild_context}.

Log​

The Log sub-page (reached from the AI Detection section in the sidebar) lists every AI scan result.

Table columns​

ColumnDescription
TimeWhen the scan occurred
UserThe user whose message was scanned
CategoryThe threat category assigned
ConfidenceThe AI confidence score
ProviderThe AI provider used
ActionThe action taken (or "No action" if below threshold)

Click any row for a detail sheet with the full message content, the analysis result, and the AI's reasoning ("why was this flagged?").

Filtering and pagination​

Search across user IDs, usernames, and message content, narrow by category or action, and page through results with cursor-based Next and Previous controls.

note

The AI scan log uses the AI_DETECTION permission, not LOGGING. AI detections also appear in the unified Threats log.