Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/artemis-development-group/artemis/llms.txt

Use this file to discover all available pages before exploring further.

AutoModerator is Artemis’s built-in rules engine that automatically checks every new submission and comment in a branch against a set of moderator-defined rules. When a rule’s conditions are satisfied, AutoModerator can remove, approve, flair, comment on, or report the item — without any manual intervention. Rules are written in YAML and stored directly in the branch’s wiki.

How Rules Are Stored

A branch’s AutoModerator rules live on a mod-only wiki page at:
/r/<branch>/wiki/config/automoderator
Moderators with the config permission (or full +all access) can edit this page. The entire page is parsed as one or more YAML documents, each separated by a --- delimiter. Any section that parses to a YAML dictionary is treated as a rule definition; comments and non-dict sections are ignored.
AutoModerator re-reads the wiki page every time it needs to apply rules to a new item. Changes you save take effect immediately on new submissions and comments.

Rule Structure

Each rule is made up of one or more targets. A target defines the conditions to check and the actions to take on a specific object. Every rule has a base target (the submission or comment itself) and may optionally include targets for the author account and the parent submission (for comments).
---
# Minimal rule structure
type: submission          # or "comment", "link submission", "text submission", "any"
title: ["example"]        # condition: title must contain "example"
action: remove            # action: remove the post

Rule-Level Fields

These fields are set at the top level of the rule and apply to the rule as a whole:
FieldTypeDefaultDescription
typestringanyWhich kind of item to match: submission, comment, link submission, text submission, or any
priorityint0Higher-priority rules are evaluated first
moderators_exemptboolautoIf true, the rule is skipped for moderators’ posts. Removal and report rules skip mods by default
commentstringPost a distinguished reply with this text
comment_stickiedboolfalseSticky the auto-posted comment
modmailstringSend a modmail message with this text
modmail_subjectstringAutoModerator notificationSubject line for modmail
messagestringSend a private message to the author
message_subjectstringAutoModerator notificationSubject line for the private message

RuleTarget Types

A Rule can contain up to three RuleTarget objects, each applying conditions and actions to a different object:

base

The submission or comment being checked. Conditions defined at the top level of the rule apply here.

author

The account that made the submission or comment. Define an author: block in the rule to check author properties.

parent_submission

The link post that a comment belongs to. Only valid when type: comment. Define a parent_submission: block to check properties of the parent post.

Available Conditions

Content conditions (submissions and comments)

ConditionTypeDescription
reportsintMatch if the item has at least this many reports
body_longer_thanintMatch if body length (stripping leading/trailing non-word characters) exceeds this value
body_shorter_thanintMatch if body length is less than this value
ignore_blockquotesboolWhen checking body length or body text, strip quoted lines first
is_editedboolMatch based on whether the item has been edited
is_top_levelboolComments only — match top-level comments (true) or replies (false)

Text field matching

You can match against the following fields by using the field name as a YAML key with a list of strings (or a single string) to check for: Submission fields: title, domain, url, body, flair_text, flair_css_class, media_author, media_author_url, media_title, media_description, id Comment fields: body, id Author account fields: name, flair_text, flair_css_class, id Prefix a field name with ~ to invert the match (i.e. must not match). Combine fields with + to check multiple at once. Add modifiers in parentheses after the field name:
ModifierBehavior
full-exactEntire field must equal the value
full-textField must equal the value ignoring leading/trailing non-word characters
includesField contains the value anywhere
includes-wordField contains the value as a whole word
starts-withField starts with the value
ends-withField ends with the value
case-sensitiveMatch is case-sensitive (default is case-insensitive)
regexTreat the value as a regular expression

Author account conditions

These apply inside an author: block (or directly to Account targets):
ConditionTypeDescription
comment_karmaint stringAccount’s comment karma, supports operators: < 10, > 100, == 0
post_karmaint stringAccount’s post karma (alias: link_karma)
combined_karmaint stringSum of post and comment karma
account_agestringAge of the account, e.g. < 30 days, > 1 year
is_goldboolWhether the account has gold
is_submitterboolWhether the account is the OP of the parent post (comment rules only)
is_contributorboolWhether the account is an approved contributor in the branch
is_moderatorboolWhether the account is a moderator of the branch
satisfy_any_thresholdboolIf true, pass if any karma/age threshold is met instead of all

Available Actions

Item actions (base target)

Action valueEffect
approveApprove the item if it was removed or reported
removeRemove the item (not spam-trained)
spamRemove the item and train the spam classifier
filterRemove the item but keep it visible in the mod queue (auto=True)
reportFile a report on the item
Set the action with the action key. Use action_reason (alias: report_reason) to attach a reason string.

Additional item actions

FieldTypeApplies toDescription
set_flairstring or listsubmissions, author accountsSet flair text and optional CSS class: [text, css_class]
overwrite_flairboolsubmissions, author accountsIf false (default), skip if flair already exists
set_nsfwboolsubmissionsMark or unmark the post as NSFW
set_lockedboolsubmissionsLock or unlock the comments thread
set_stickybool or intsubmissionsSticky the post; use an integer to specify the sticky slot (1–max stickies)
set_contest_modeboolsubmissionsEnable or disable contest mode on the post
set_suggested_sortstringsubmissionsSet the suggested comment sort (e.g. new, top, confidence)

Example Rules

Remove new accounts with low karma

---
type: submission
author:
  account_age: "< 30 days"
  comment_karma: "< 10"
  post_karma: "< 10"
action: filter
action_reason: "new account — held for review"

Auto-remove posts from banned domains

---
type: link submission
domain:
  - spamsite.example
  - anotherspammer.example
action: spam

Flair text submissions automatically

---
type: text submission
set_flair: ["Text Post", "text-flair"]

Welcome new OPs with a stickied comment

---
type: submission
author:
  post_karma: "< 5"
  is_moderator: false
comment: |
  Welcome! It looks like this might be one of your first posts here.
  Please read the rules in the sidebar before continuing.
comment_stickied: true
moderators_exempt: true

Notify mod team when a post gets many reports

---
type: any
reports: 5
modmail: "A post has received 5 or more reports: {{permalink}}"
modmail_subject: "High-report item"

Placeholders

You can use placeholders in comment, modmail, message, and action_reason values:
PlaceholderReplaced with
{{author}}The author’s username
{{body}}The post or comment body
{{branch}}The branch name
{{kind}}submission or comment
{{permalink}}Full permalink to the item
{{title}}Title of the submission (or parent submission for comments)
{{url}}URL of a link submission
{{domain}}Domain of a link submission
{{author_flair_text}}The author’s flair text in this branch
{{author_flair_css_class}}The author’s flair CSS class in this branch
{{media_author}}oEmbed media author name
{{media_title}}oEmbed media title
{{media_description}}oEmbed media description
{{media_author_url}}oEmbed media author URL
For regex rules, you can also use {{match-1}}, {{match-2}}, etc. to reference capture groups, or {{match-fieldname-1}} to reference a capture group from a specific field’s match.

PerformedRulesByThing: Preventing Duplicate Actions

PerformedRulesByThing is a Cassandra-backed store that records which rule IDs have already been applied to each item. Each entry expires after 3 days. When a rule is marked as unrepeatable — because it posts a comment, sends modmail, sends a message, or files a report — AutoModerator checks this store before executing. If the rule has already run on that item, it is skipped. This prevents duplicate sticky comments and duplicate modmail messages on items that are re-processed.
Removal, approve, flair, lock, sticky, NSFW, and sort actions are not unrepeatable — they are idempotent, so re-running them is safe.

Build docs developers (and LLMs) love