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.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.
How Rules Are Stored
A branch’s AutoModerator rules live on a mod-only wiki page at: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).Rule-Level Fields
These fields are set at the top level of the rule and apply to the rule as a whole:| Field | Type | Default | Description |
|---|---|---|---|
type | string | any | Which kind of item to match: submission, comment, link submission, text submission, or any |
priority | int | 0 | Higher-priority rules are evaluated first |
moderators_exempt | bool | auto | If true, the rule is skipped for moderators’ posts. Removal and report rules skip mods by default |
comment | string | — | Post a distinguished reply with this text |
comment_stickied | bool | false | Sticky the auto-posted comment |
modmail | string | — | Send a modmail message with this text |
modmail_subject | string | AutoModerator notification | Subject line for modmail |
message | string | — | Send a private message to the author |
message_subject | string | AutoModerator notification | Subject line for the private message |
RuleTarget Types
ARule 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)
| Condition | Type | Description |
|---|---|---|
reports | int | Match if the item has at least this many reports |
body_longer_than | int | Match if body length (stripping leading/trailing non-word characters) exceeds this value |
body_shorter_than | int | Match if body length is less than this value |
ignore_blockquotes | bool | When checking body length or body text, strip quoted lines first |
is_edited | bool | Match based on whether the item has been edited |
is_top_level | bool | Comments 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:
| Modifier | Behavior |
|---|---|
full-exact | Entire field must equal the value |
full-text | Field must equal the value ignoring leading/trailing non-word characters |
includes | Field contains the value anywhere |
includes-word | Field contains the value as a whole word |
starts-with | Field starts with the value |
ends-with | Field ends with the value |
case-sensitive | Match is case-sensitive (default is case-insensitive) |
regex | Treat the value as a regular expression |
Author account conditions
These apply inside anauthor: block (or directly to Account targets):
| Condition | Type | Description |
|---|---|---|
comment_karma | int string | Account’s comment karma, supports operators: < 10, > 100, == 0 |
post_karma | int string | Account’s post karma (alias: link_karma) |
combined_karma | int string | Sum of post and comment karma |
account_age | string | Age of the account, e.g. < 30 days, > 1 year |
is_gold | bool | Whether the account has gold |
is_submitter | bool | Whether the account is the OP of the parent post (comment rules only) |
is_contributor | bool | Whether the account is an approved contributor in the branch |
is_moderator | bool | Whether the account is a moderator of the branch |
satisfy_any_threshold | bool | If true, pass if any karma/age threshold is met instead of all |
Available Actions
Item actions (base target)
| Action value | Effect |
|---|---|
approve | Approve the item if it was removed or reported |
remove | Remove the item (not spam-trained) |
spam | Remove the item and train the spam classifier |
filter | Remove the item but keep it visible in the mod queue (auto=True) |
report | File a report on the item |
action key. Use action_reason (alias: report_reason) to attach a reason string.
Additional item actions
| Field | Type | Applies to | Description |
|---|---|---|---|
set_flair | string or list | submissions, author accounts | Set flair text and optional CSS class: [text, css_class] |
overwrite_flair | bool | submissions, author accounts | If false (default), skip if flair already exists |
set_nsfw | bool | submissions | Mark or unmark the post as NSFW |
set_locked | bool | submissions | Lock or unlock the comments thread |
set_sticky | bool or int | submissions | Sticky the post; use an integer to specify the sticky slot (1–max stickies) |
set_contest_mode | bool | submissions | Enable or disable contest mode on the post |
set_suggested_sort | string | submissions | Set the suggested comment sort (e.g. new, top, confidence) |
Example Rules
Remove new accounts with low karma
Auto-remove posts from banned domains
Flair text submissions automatically
Welcome new OPs with a stickied comment
Notify mod team when a post gets many reports
Placeholders
You can use placeholders incomment, modmail, message, and action_reason values:
| Placeholder | Replaced 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 |
{{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.