/r/AutoModerator

Photograph via snooOG

Important announcements, helpful tips, and discussion regarding AutoModerator.

What is AutoModerator?

AutoModerator is a highly customizable moderation bot. It monitors new and edited submissions and comments in your subreddit and acts on them as needed.

What can AutoModerator do?

AutoModerator is commonly used to:

  • Enforce title formatting and other subreddit-specific posting rules
  • Detect and flag offensive, inappropriate, or rule-breaking content based on keywords/phrases
  • Automatically remove posts from specific users and/or websites from your subreddit
  • Post regular community discussion threads
  • Alert subreddit moderators if certain types of content are posted
  • And much more!

PLEASE READ

AutoModerator does not remove or report content by moderators by default, so test your conditions with a non-moderator account or add "moderators_exempt: false"

Get Started

/r/AutoModerator

18,989 Subscribers

1

Will these rules work as intended? (Filtering for Karma and then Flair)

Hi everyone! I want to put in place a rule that check the user's karma, check if they have a User Flair if it's under a threshold and remove the post if they don't have any. Would these blocks work?

Looking around I've seen people use both

~flair_text (regex, includes): ['.']

and

~flair_text (regex, includes): ['.+']

for similar stuff. What difference does the + make?

0 Comments
2025/01/31
19:07 UTC

0

Hi, I would like to make automod detect ipv4 addresses

Some user on a community I moderate posted a joke ip address, which wasn't mine because although I run a tor relay, I try my best to keep it hidden. But it did get my wondering, could I set up a rule to detect ipv4 addresses. I'm thinking some sort of regex could be used, and it would then remove the comment and alert us mods. Any help thankful, have a nice day :3

9 Comments
2025/01/30
22:41 UTC

0

I'm having trouble getting automoderator

The instructions were a but comfusing and some of the links didn't work, can someone please explain how do i use it?

3 Comments
2025/01/30
20:03 UTC

1

Server error when I try to save Automod.

I'm trying to create a very simple automod script to sticky a comment on every submitted post, but I keep getting a server error when I try to save.

Is this likely due to what I'm entering or is there another problem?

I think I figured out WHY it's a problem by trying in old reddit. This is my code:

---

type: submission

comment_stickied: true

comment: Please remember to always spoiler tag any mention of a polish name or brand! To add spoiler tags: \>!text!<\

---

It doesn't like the spoiler tags, but I would still like to add a reminder of how to spoiler. Any suggestions?

0 Comments
2025/01/30
18:39 UTC

2

How to make automoderator respond to comments

I would like the automoderator to respond to the comments of each user who commented on the creator's post.

5 Comments
2025/01/30
04:14 UTC

1

"Unsupported media type" error message

I'm trying to make an automod reply to a specific flair. It works for other shorter commands I've made but this one just isn't going through. Any ideas? I know it can accept links since I've used links in other automod replies. I can leave this as a comment so it's not a character limit issue. I've even reduced it to about half of what it was originally. I have no idea what's wrong.

It's infuriating that there is no message explaining what part of the code is broken. I appreciate any help

---
# Sticky comment on Buy/Sell/Trade threads
type: submission
flair_text (includes-word): ["Buy/Sell/Trade Thread"] 
comment_locked: true
comment_stickied: true
comment: |
    # When shipping within the U.S. (domestic mail)

    USPS is recommended when shipping radium items, it'll give you the least amount of hassle. You have to follow [NRC](https://scp.nrc.gov/narmtoolbox/radium%20faq102008.pdf), USPS, DOT requirements when mailing radioactive materials, in this case, radium items. Requirements are very simple - USPS has a [publication](https://pe.usps.com/text/pub52/pub52apxc_025.html) you can read and follow. (I personally have received many packages that do not follow these requirements.

    Most of the time, nothing will happen, at worse your package is rejected and returned.

    Shipping a radioactive, radium, package normally with UPS or FedEx will result in your package being confiscated, disposed of, or requires a fee to be paid before collecting your package in person and you better hope the location is close by.

    # When shipping from the U.S. to another country (international mail)

    First, both buyer and seller must be aware if the radium item is legal or illegal to own in that specific country.

    If legal, then **the seller must follow regulations from both the U.S. and the country you are shipping to**, as well as the [IATA](https://www.iata.org/en/publications/newsletters/iata-knowledge-hub/what-you-need-to-know-about-the-transport-of-dangerous-goods-by-air/) and [IAEA](https://www-pub.iaea.org/MTCD/Publications/PDF/TCS-01_4th_web.pdf) (as needed) international shipping is a lot more strict.

    1. The shipper (seller) must fill out a customs form, USPS has a tool for this.
    2. The shipper (seller) MUST fill out a ["Shipper’s Declaration for Dangerous Goods"](https://pe.usps.com/text/pub52/pub52c3_007.htm) and 3 signed copies attached to the outside of the package in an [envelope](https://kingfisherpackaging.com/wp-content/uploads/2016/12/Doc-Wallet.jpg) that can be [easily opened and resealed](https://www.interplas.com/product_images/packing-list-envelopes/sku/4.5-x-5.5-Packing-List-Enclosed-Packing-List-Envelope-on-Box-1000px-600.webp) is required.
    3. Place the radium item in a box and clearly label the box "Radioactive".
    4. The package can not be smaller than 4 inches on any side.
    5. The surface of the package itself from 4 inches / 10 centimeters away must not be more than 0.5 millirem per hour on any side of the package. (0.5 mrem/hr = 5 μSv/hr = 
    0.005 mSv/hr)
    6. The package, on the address side, must bear the label "This package conforms to the conditions and limitations specified in 49 CFR 173.424 for radioactive material, excepted package–instruments or articles, UN2911 and is within Postal Service activity limits for mailing.”
    7. The package must bear the UN number label "UN2911" on the side of the package that is not on the address side nor on the top or bottom of the package.
    8. The package, on the address side, must bear the label "Matieres Radioactives".
    9. The package, on the address side, must bear the label “Return to Sender in Case of Nondelivery” AND “Radioactive Materials, Quantities Permitted for Movement by Post”.
    10. When shipping in large quantities, additional requirements are needed to be met. Such as [how much you can mail](https://pe.usps.com/text/pub52/pub52c3_026.htm#ep999364), restricted air transport by cargo aircraft only, and industrial package type [IP-1](https://www.law.cornell.edu/cfr/text/49/173.410). Technically, **for specific activities of radium**, you also need to acquire a permit to export/import radium as this will be regulated as a general licensed source material.

    You may attempt to avoid the shipper's declaration of dangerous goods, and USPS packaging requirements and only fill out the customs form marked as "Gift" or "Merchandise" and describe the content as "antiques" or "clock" or something similar, just no mention of it being "radium" or "radioactive", and don't use words that make it sound valuable such as "WWII US Navy Watch".

    *Thank-you to placeholder for compiling this resource.*
---
8 Comments
2025/01/30
00:42 UTC

1

Automod Make Different Comment/Action Based On Post Flair

So I'm trying to work on a way to pin posts just by commenting "!pin", idea is I will put the permalink info in the flair, have automod read it, then link to that in the comment. I'm having trouble with 1 line right now though before moving on:

"flair_text: "Sticky""

#AutoMod Pin Comment
type: comment
author:
    is_moderator: true
moderators_exempt: false
body: ["!Pin"]
action: remove
action_reason: "Removed mod request and pinned comment." 
parent_submission:
    set_flair: ["Sticky", "Sticky", "Sticky"]
    overwrite_flair: true
    action: report
---
#Second Rule To Pin Comment
type: submission
reports: 1
flair_text: "Sticky"
action: approve
comment: |
    The Manitoba mod team has decided to sticky [this comment]({{permalink}}) as they have felt it to be extra informative or useful to the post discussion.


    The reason for sticking this comment is "{{body}}".

comment_stickied: true
comment_locked: true

So it works fine until I try to check for flair_text, if I # out that line then it approves the post and comments. I've tried

flair_text (Includes): "Sticky"

as well with no luck. The first rule is working fine right now, it sets the flair to "Sticky", but if I had that flair check it doesn't work. Any thoughts?

It needs to be able to read the flair and only action if it sees "sticky" so it doesn't try to sticky a comment on every post that is reported.

4 Comments
2025/01/29
23:57 UTC

0

How can I combine text + an emoji in a rule?

I know how to scan for text. I know how to scan the unicode for emojis. I'm not sure how to combine them.

TikTok culture has people thinking rules against discussing certain topics means it's fine to post things like "child 🌽" as if it's the words, not topic that's banned.

Is it just

body#1: [child]
body#2 (regex, includes): /000000
0 Comments
2025/01/29
22:41 UTC

1

Im trying to send a private message to the user when the post is awaiting moderator approval.

---

# Filter posts using banned words
title+body (regex): ["\\bblack\\b(?!\\sflag)", "\\basian\\b", "\\bracist\\b", "\\bsexist\\b", "\\bhatred\\b", "\\bhate\\b", "\\bhates\\b"]
action: filter
action_reason: "Potential racist message"

type: message
comment: |

Hello (username)!

Thank you for posting on r/AssassinsCreedShadows, your submission is awaiting approval due to some issues/problems that have been happening recently. Our mod team will check your post to see if nothing is wrong!
**Please be patient**.

Make sure to take a look at our rules before posting or commenting!

Sincerely, The r/AssassinsCreedShadows Mod Team

---

YAML parsing error in section 2: while parsing a block mapping
  in "<unicode string>", line 2, column 1:
    title+body (regex): ["\\bblack\\ ... 
    ^
expected <block end>, but found '<block mapping start>'
  in "<unicode string>", line 6, column 2:
     type: message
3 Comments
2025/01/29
17:04 UTC

1

Possible to use Automod to comment the crosspost author?

Trying to get aurtomod to comment on a crosspost, noting the author of the original post being crossposted but it isn't working. Any ideas & is it even possible?

type: crosspost submission
comment: |
Originally posted by {{crosspost_author}}
**Post Title:** {{title}}
**Body**: {{body}}
0 Comments
2025/01/29
10:16 UTC

1

Filter does nothing unless "action:" is commented out.

I've used this filter with different domain names for years. For some reason it does not work anymore. Interestingly, if I remove the line for "action:" I at least get the message sent.

Same thing happens for the alternatively written filters posted here about a week ago. Those filters do not work either. If I remove the line with "action:" I at least get the message sent.

Any clues as to what the problem could be?

# Remove content on any of these keywords
type: any
domain+body+title+media_description (regex): [facebook.com, x.com, twitter.com]
#action: remove
action_reason: Content Removed from author /u/{{author}}. Filtered on a link going to {{match}}
message: |
    Your content was removed for having a link going to {{match}}

    Please review the rules for /r/{{subreddit}}

    https://www.reddit.com/r/{{subreddit}}/about/rules
2 Comments
2025/01/29
10:06 UTC

2

Post submission link flair

I need AM to remove a post with unmodified {Years} link flair. Others link flair is fixed. Except one which user can modify them.

---

type: submission

reports:

- "No valid year in flair"

conditions:

- operator: "regex_match"

field: "link_flair_text"

value: "^(?!.*\b(19|20)\d{2}\b).*"

actions:

- remove

- message:

subject: "Your post was removed"

body: "Your post must include a valid four-digit year (e.g., 2024) in the link flair. Please resubmit with the correct flair."

---

Does the above code correct?

0 Comments
2025/01/29
07:17 UTC

3

Unsure about multiple author checks behaviour

Wondering if these rules behave how I intend it to:

author:        has_verified_email: false     comment_karma: < x action: remove action_reason: "xxxxxx" --- author:     comment_karma: "< -20" action: remove action_reason: "Low karma user"

Expected behaviour:

  • User does not have verified email, has less than x comment karma: remove
  • User has a verified email, but less than x comment karma: no action
  • User does not have verified email, but more than or equal to x comment karma: no action
  • User with less than -20 karma, with or without verified email: remove

I'm encountering an issue where a test account with a verified email is still blocked from posting on my sub. It's receiving a "You can't contribute in this community yet" popup from Reddit, stating that "you have 1 comment karma. Earn more by commenting across Reddit" (something like this, and this).

The popup that I get doesn't even mention the verified email requirement - it only lists a comment karma requirement (which, again, should be ignored since this account already meets the verified email check)

These are the only rules in my config that involves karma thresholds.

Not sure if this has something to do with how I'm writing these rules. Greatly appreciate any help on this.

5 Comments
2025/01/29
05:35 UTC

1

New accounts still being able to comment

So I have the following in my automoderator code

---
# This will remove a post if the user has an account that is less than 7 days old.
priority: 1
type: any
author:
account_age: < 7 days
action: remove
action_reason: Your account is too new, your post has been removed.
set_flair:
text: "New Account detected."
overwrite_flair: true
comment: |
Hello /u/{{author}}

Your {{kind}} has been removed from /r/{{subreddit}} because your account is too new.
This is to combat SPAM and BOTs.

** Your {{kind}} is currently being looked at by the Moderation Team and will either be APPROVED or DENIED. **
comment_locked: true
comment_stickied: true
message_subject: Your account is too new, your post has been removed.
message: |
Hello /u/{{author}}

Your {{kind}} has been removed from /r/{{subreddit}} because your account is too new.
This is to combat SPAM and BOTs.

** Your {{kind}} is currently being looked at by the Moderation Team and will either be APPROVED or DENIED. **

It seems that they are not able to post but can comment, does anything standout as wrong with the code?

4 Comments
2025/01/28
11:18 UTC

0

How do i apply automations only to a specific flair

For a example user selects flair X , guideline X shows up.

5 Comments
2025/01/28
09:32 UTC

0

How To Get Automod To Remove Posts That Are NOT Link Posts w/o Specific Post Flair?

As the title states. I was wondering if it was possible to set certain post flairs to ONLY be posted as a link post and not text. I have tried looking for this but haven't found it yet.

Try not to revamp the way the sub works. Rather than require people put genres in titles for their submissions (because I like the ability for users to filter through submissions in the sub via post flairs) I was hoping to do it this way. Thanks in advance!

0 Comments
2025/01/28
02:21 UTC

1

3 years ago there was a way to detect embedded images and videos in text posts. It works great for users using desktop, unfortunately mobile app users it doesn't work.

Here's the post.

Basically it uses !\[img\] to find out if there's an image in a self post.

I tested it out on both mobile and desktop.

  • On desktop it won't use a lightbox and on old reddit it won't load the image at all. Instead it writes it like so: https://preview.redd.it/longimagename.png?width=1290&format=png&auto=webp&s=3b74eb0019e7ed0fe35d4498e8d976f002d6d971 This will properly be found by the AutoModerator rule linked above.
  • On Mobile though the image preview works just fine. Example here.. It does seem to use some kind of lightbox. The issue if a user is on mobile it doesn't use the `[IMG]` code and the AutoModerator rule doesn't work properly.

Anyone have any ideas to make this work for mobile users?

EDIT:

So I noticed on the mobile version it is submitting not as a self post, but as an image post. It has the domain i.redd.it instead of self post. You also can't edit the post after submission which is odd.

This is important to note because if you write an automod rule requiring certain text with the image it breaks the rule. It finds the text, but not the image.

Example of the rule:

#Self Posts trying to post xcancel links but no screenshot was added (xcancel isn't a replacement of twitter links and this doesn't include the screenshot. This drives traffic to xcancel and could hug it to death. So we remove it)`
type: submission`
body (regex, includes): ['https?://(?:www\.)?(xcancel)\.com/(.+)']`
~body (regex, includes): ['(?=.*\[img\])']`
moderators_exempt: false`

So what I can do to fix this is change from type: submission to type: text submission so it only does it to self posts.

Then I can create (hopefully) a rule for posts with domain i.redd.it

4 Comments
2025/01/27
19:06 UTC

1

I forgot how to pin a comment on every posts in our subreddit

I was wondering how I could put a comment under each post redditor do under their post, thanks for your response in advance

2 Comments
2025/01/27
12:56 UTC

2

Can automod create a sticky post if it removes a keyworded mod comment?

Or even just a mod comment? Let's say I reply to a comment with !locked can automod lock the post and leave a sticky comment? Or is it stuck replying to my comment? Idea is it auto removes "!locked" and then locks the post for example leaving a comment explaining why (it would be my comment minus the !locked so if I say "!locked because mods are sleeping" it would leave a comment saying "This post is locked because mods are sleeping".

9 Comments
2025/01/27
07:01 UTC

3

New Mod having trouble setting up Auto Mod.

My friends and I have a new sub and have been trying for weeks to set up auto mod. The only thing we want it for is to filter accounts that join the sub, to be at least 3 months old.

  1. Can we set it up without a wiki?

  2. Is there an auto mod guide for dummies? Lol.

Any help would be appreciated.

Thank you.

7 Comments
2025/01/27
02:57 UTC

1

Automoderator listed as Moderator in other subs

Question - I see many subs that show AutoModerator listed under Moderators - but it isn’t in mine.

With AuotModerator not listed as an authorized Moderator in our sub - was there a step missed somewhere?

AutoModerator is working great, but wanted clarification.

Thank you!

9 Comments
2025/01/27
01:53 UTC

2

How to make my automod only pop-up to single word comment ? Like I don`t want it to comment if the comment says 'I need an x-ray' but will if you comment 'x-ray'

body+title (includes-alfa): ["alfa"]

comment: |

   alfa

---

body+title (includes-bravo): ["bravo"]

comment: |

   bravo

---

body+title (includes-charlie): ["charlie"]

comment: |

   charlie

---

body+title (includes-delta): ["delta"]

comment: |

   delta

---

body+title (includes-echo): ["echo"]

comment: |

   echo

---

body+title (includes-foxtrot): ["foxtrot"]

comment: |

   foxtrot

---

body+title (includes-golf): ["golf"]

comment: |

   golf

---

body+title (includes-hotel): ["hotel"]

comment: |

   hotel

---

body+title (includes-india): ["india"]

comment: |

   india

---

body+title (includes-juliett): ["juliett"]

comment: |

   juliett

---

body+title (includes-kilo): ["kilo"]

comment: |

   kilo

---

body+title (includes-lima): ["lima"]

comment: |

   lima

---

body+title (includes-mike): ["mike"]

comment: |

   mike

---

body+title (includes-november): ["november"]

comment: |

   november

---

body+title (includes-oscar): ["oscar"]

comment: |

   oscar

---

body+title (includes-papa): ["papa"]

comment: |

   papa

---

body+title (includes-quebec): ["quebec"]

comment: |

   quebec

---

body+title (includes-romeo): ["romeo"]

comment: |

   romeo

---

body+title (includes-sierra): ["sierra"]

comment: |

   sierra

---

body+title (includes-tango): ["tango"]

comment: |

   tango

---

body+title (includes-uniform): ["uniform"]

comment: |

   uniform

---

body+title (includes-victor): ["victor"]

comment: |

   victor

---

body+title (includes-whiskey): ["whiskey"]

comment: |

   whiskey

---

body+title (includes-x-ray): ["x-ray"]

comment: |

   x-ray

---

body+title (includes-yankee): ["yankee"]

comment: |

   yankee

---

body+title (includes-zulu): ["zulu"]

comment: |

   zulu

2 Comments
2025/01/26
20:18 UTC

1

We want to ban an emogy but it doesnt allow it, whats wrong with my code ?

---

body+title (includes-word): ["🔥"]

action: remove

message: |

We're not a beauty contest subreddit

---

3 Comments
2025/01/26
19:54 UTC

1

Different minimum post lengths in different post flairs?

Is it possible to have different minimum post body length requirements for different flairs?

Let’s say theres 3 kinds of flairs and text requirements:

  • Questions - 0 character req
  • Story - 300 characters
  • Pics - 100 characters (this is a photo submission instead of a text submission)
4 Comments
2025/01/26
13:48 UTC

1

One of my rules stopped working?

I moderate a sub that requires users to have either at least 50 karma or verified email to post or comment. I have noticed two people slip by recently, and I just checked the mod log and automoderator hasn't removed anything for that reason (or for any other reason, but automatic removals for other reasons are rare anyway) since December 20th. I haven't modified that rule. On December 20th (after automoderator's last mod log action), I added a rule for automoderator to delete anything from a particular user and notify us that she'd posted. (A serial ban evader whose new account I identified when I saw her in another sub.) Since then, I have also set up the modmail to Discord app and set automoderator to send a modmail for every new post and every time anything is reported even once. Can anyone tell me what I'm doing wrong?

---
author:
    combined_karma: < 50
    has_verified_email: false
    is_contributor: false
action: remove
action_reason: User has unverified email and low karma
comment: |
    Your submission to r/ESFJ has been removed. Users with low karma must have verified email.
---
    title: [blasphemer, blaspheming, logicalemotion7, psychopath, sadist, amoral]
    action: filter
    action_reason: "Possible troll post"
    modmail: The above submission by /u/{{author}}, with title "{{title}}" may be a troll post.
---
    reports: 2
    action: filter
    action_reason: "Multiple reports"
    modmail: The above {{kind}} by /u/{{author}} has received multiple reports. Please investigate.
---
    author:
        name: [Queasy-Donut-4953, Educational-Let-1027]
    action: remove
    action_reason: "User is banned"
---
    title: [CEO, killing, killer, assassination, murder, Luigi, Mangione, UHC]
    modmail: The above submission by /u/{{author}}, with title "{{title}}" may be about the assassination of the United Healthcare CEO.
---
    author:
        name: [Bunny_Carrots_87]
    action: remove
    action_reason: "Ban evader"
    modmail: The ban evader is back.
---
    type: submission
    modmail: |
        There is a new post in /r/{{subreddit}}!

        - Title: {{title}}
        - User: {{author}}
---
    reports: 1
    modmail: The above {{kind}} by u/{{author}} has been reported. Please investigate.
---
3 Comments
2025/01/26
12:15 UTC

1

Auto first comment

Hi, I just opened my first subreddit and I admit that I don't yet master all the features! I would like there to be an automatic comment under the publications, how can I do that?

4 Comments
2025/01/26
10:20 UTC

1

Justifying automod doings

We have a few automatic comments that automod stickies up for various reasons. I'd like to add some justification to these actions, much like action_reason, but these rules contain no action parameter. Can I still use action_reason, or is there something else I can do? This would make it much easier to see what automod is doing when looking at the modlog

3 Comments
2025/01/25
23:37 UTC

2

New mod wondering about the capabilities of AutoModerator

Can an AutoMod bot assign user flair? Also can the AutoMod bot act on poll results made on reddit? Also can it be possible to create a bot that communicates results from a google forms poll or any polling software with reddit login?

2 Comments
2025/01/25
19:53 UTC

2

I'm receiving an "unsupported media type" error and I'm not sure why.

I wish to stop users from having the ability to add blocks of text to posts with either links or images. I wrote the following code (as suggested by another) but I cannot get it saved.

---
   ### close loophole of text body being included in image posts via the official app
   type: link submission
   standard: direct image links
   body_greater_than: 0
   action: remove
   action_reason: "TEXT IN IMAGE POST"
---
5 Comments
2025/01/25
07:18 UTC

1

Looking for feedback/help with auto user flair code based on combined_sub_karma

Hello Everyone!

This is my first time diving into the user flair that is assigned by automod with based on combined_sub_karma. I just tested this code and it's not assigned the user flair that I have created. Would someone mind giving me some feedback?

I have searched this sub and Reddit extensively and I can only find posts from users also trying to fix their code.

Here is what I have:

---

# SET USER FLAIR Entry Level 1 in sub karma
type:  any
author:
    post_subreddit_karma: ">1"
moderators_exempt:  true
set_flair:
        template_id: 0273fb32-da6d-11ef-bcec-1e8b98f9cc91
overwrite_flair:  true

---

# SET USER FLAIR Bronze 20 in sub karma
type:  any
author:
    post_subreddit_karma: ">20"
moderators_exempt:  true
set_flair:
        template_id: 1cbb0ae4-da6d-11ef-a17d-92bf99e6a85f
overwrite_flair:  true

---

# SET USER FLAIR Silver 300 in sub karma
type:  any
author:
    post_subreddit_karma: ">300"
moderators_exempt:  true
set_flair:
        template_id: 66dac4e8-da6d-11ef-924d-6a2ce23497c5
overwrite_flair:  true

---

# SET USER FLAIR Gold 500 in sub karma
type:  any
author:
    post_subreddit_karma: ">500"
moderators_exempt:  true
set_flair:
        template_id: a07ead54-da6d-11ef-a46a-4e6315709b6c
overwrite_flair:  true

---

# SET USER FLAIR Platinum 1000 in sub karma
type:  any
author:
    post_subreddit_karma: ">1000"
moderators_exempt:  true
set_flair:
        template_id: 2b233ee8-da6e-11ef-ae54-c253d1a77b5a
overwrite_flair:  true

---
5 Comments
2025/01/24
16:44 UTC

Back To Top