/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,028 Subscribers

1

How do you set automod to only catch words when it's not part of another word?

As an example, the word one

I want to filter comments with "one" in it, like "One apple" or "number one"

However, I don't want automod to catch words like "money" "done" or "zone"

I currently have it set up as ' +one \*' and ' \*one +'

Is there a way to do that without adding a whitelist of every single word that i don't want automod to catch?

2 Comments
2024/11/01
16:32 UTC

1

I got automod to remove 👌 but it’s not catching 👌🏼

Hi there, so I figured out the Unicode for the 👌 emoji and got that to filter but 👌🏼 has a “modifier” and I don’t know how to code that into automod. This 👌🏼 has the following code points “U+1F44C U+1F3FC”. I don’t know how to combine them, because I have and it to remove all skin colors or the emoji. Thank you

4 Comments
2024/11/01
15:12 UTC

2

Help with rules - I can't get them to work properly

Account age filter

The account age filter is blocking posts and comments from the accounts under 30 days old.

But..... it's not sending the poster a message, and it also doesn't go to the mod query.

Restricted websites

Dosen't work at all

imgur link

0 Comments
2024/10/31
16:53 UTC

3

Looking to remove specific single word comments like “would”, “fine” and “mine”

I would like to remove sexual comments like “would” but not remove the word would otherwise. However I am fine with short comments being allowed in general. Thank you!

8 Comments
2024/10/31
03:21 UTC

2

Can I change a post flair based on a keyword in the comment?

I tried this but it changed my user flair instead:

type: comment

body (includes): ['Yes']

is_top_level: true

author:

overwrite_flair: true

set_flair: ['Test']

10 Comments
2024/10/29
18:10 UTC

1

I Need to Add Post Approval to All Non-Mod Posts! If Possible only posts with certain flairs.

Title pretty much sums it up.

Looking for non-mod posts to require approval, and if possible only posts that have certain flairs.

I get an error whenever I try to enter something into the automod feature.

14 Comments
2024/10/28
17:20 UTC

5

How do I make it so that I get a modmail whenever a Non-mod user posts

I have a new subreddit, and I have no experience with any sort of code writing.

All I want to do is to get modmail when a user posts. It could be better if it notifys when a Non-moderator user posts. Its just that its a very small subreddit, and I want to see new people participating :)

7 Comments
2024/10/27
15:26 UTC

1

Replace Existing Sticky Comment with another one if Title Contains Specific Words?

I have a general sticky comment for every post, but now I want to have a different sticky comment if some words are on the title submission to replace the general sticky comment.

This code makes two sticky comments for each submission instead :( Pls help. Thank you.

---
type: submission
comment: |  

      Comment 1 here for every post in general. 

 comment_stickied: true

 ---
 type: submission
title  (regex): ["Question", "I wonder"]
comment_stickied: true
comment: |
    
      comment 2 if certain words are on the title.

 comment_stickied: true


 ---
5 Comments
2024/10/26
22:42 UTC

1

Unable to place '#' on existing code to comment in AutoMod.

EDIT: Good news! It's working now. Not sure what went wrong, but maybe AM was having a bad day. I removed a snippet, saved the reason, and then put it back with a comment. It worked. Thanks for everyone's support!

─── ⋆⋅☆⋅⋆ ───

Hey there,

I tried to find the answer but couldn’t, so I apologize if this is a repeated question.

I was just added as a mod in a large subreddit, and I'm trying to comment on an existing rule they want lifted, but I’m unable to do so due to an error (I'm trying to disable the rule, make AM ignore these lines).

  • On the new Reddit, it just shows "something went wrong."
  • On the old Reddit, it doesn't save, and no message appears.

I'm not sure if this is a permission problem since I'm at the bottom of the moderator list, but it’s odd that I can add code but not comment on existing ones. I tried to add myself in the settings to "allow users to edit page," but that didn't solve the issue.

Thank you for your help!

Here is how I'm trying to comment:

# Selling removal with message (S)
#
#type: submission
#title (regex):
#    - "I am selling"
#    - "for sale"
#    - "Looking to buy tickets"
#action: remove
#action_reason: "attempting to buy/sell tickets, hotels, etc."
#comment: |
#    Your submission has been removed because it appears to be offering to purchase or sell. We are unable to verify the authenticity of people reselling tickets, hotels, etc., and thus these types of comments or posts are not allowed.

9 Comments
2024/10/26
19:17 UTC

5

Need help with approving

So I recently became a mod on a sub but when I accepted mod I had to go through all the posts and approve them, luckily it was a small sub but I don't know why it did this so I need help for approving post and comments automatically

11 Comments
2024/10/26
09:22 UTC

0

Please explain...

8:32 TEMO E ll 38% u/AutoModerator AutoModerator notification u/AutoModerator 2m https://www.reddit.com/r/CringeTikToks/comments [1gc7olv/bruh/ltrvnr8/ Hello /u/Powerful_Economics_1 your submission has been removed due to your account not having enough comment karma. We do this to protect our subreddit against ban evaders, trolls, and more. Sorry for the inconvenience am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns

6 Comments
2024/10/26
00:35 UTC

5

Auto-Flair Country

Hi, I did see some community that you leave a comment (and maybe join) and they will give you a flair, like "🇮🇹 Italy" if you are in Italy, "🇺🇸 US" if you are in US. How do I make the same thing?

10 Comments
2024/10/25
21:14 UTC

2

How to make all links needed to be revised by mods so they can be approved?

Title. I want to stop links to avoid surveys and spammers.

9 Comments
2024/10/25
18:33 UTC

1

How to send posts with specific flair to mod queue

A sub I moderate has been inundated with a particular type of post, and we would like to hold these posts back for review to make sure they contain a specific details.

We already have automod setup to send a note to modmail, but that's only after the post has already gone up.

From what I've gathered googling, it would be using the "filter" function? And probably similar to the modmail alert code.

But I'm not sure how to write it as I'm easily confused by code.

3 Comments
2024/10/25
18:14 UTC

2

Specific emoji filter rule

Hey all, I'm trying to set up an automod filter to remove any use of a specific emoji. I saw other examples on this sub and used them as templates, but it doesn't seem like automod is removing these even if we have a non-mod make a comment using the emoji. My code is below; any assistance would be appreciated.

#Filter turtle emoji
    domain+body+title (includes, regex): ["\U0001F422"]
    action: filter
    action_reason: "Filtered for - {{match}}"
2 Comments
2024/10/25
17:03 UTC

1

Can I block specific Twitter accounts using automod?

We have a domain blacklist. I don't want to block all Twitter/X posts - but I want to be able to create a list of specific accounts that are blocked.

Automod isn't my strong suit - but I have to imagine this is possible. Can anyone provide some direction on how to implement?

3 Comments
2024/10/25
15:16 UTC

3

Approve comments from OP when their post has been approved

TLDR: The rule I'm looking for would be as follows:

- delete any comments from accounts whose age is < 1 days old, except when they are commenting in a post that has been approved that they created.

Unsure if possible, open to workarounds. We want to keep bots out of the comment section while still letting new users ask for help and interact if needed once we've manually verified they aren't bots. Thanks in advance

4 Comments
2024/10/25
04:07 UTC

3

What is wrong with my regex?

I always test my regex at https://regex101.com/, but sometimes what works there does not work in automod.

For instance, I currently have the following rule:

moderators_exempt: false
title+body (regex):
- 'chimp(anzee)?(s|ing)?'
action: remove
action_reason: 'slur removal 1 [{{match}}]'

Recently, a user commented:

Are they even speaking English?

Its chimpglish

I had expected that the filter should have caught it as is since the (anzee) and (s|ing) are optional. For now, I have adjusted the rule to:

moderators_exempt: false
title+body (regex):
- 'chimp(anzee)?(glish)?(s|ing)?'
action: remove
action_reason: 'slur removal 1 [{{match}}]'

But it does not seem like it should have been nessesary.

Any tips?

Do I need to just leave the rule simple? Like just: - 'chimp'

I'd really like to make sure I understand what is going on, because not all of our rules can be so simple.

This rule does a lot of heavy lifting:

- '\bn[ie]g+(er|a|let|ro|uh|er)?[zs]?\b'
0 Comments
2024/10/24
22:11 UTC

1

Trying to remove submissions without attachment

Hi, I want AutoMod to check submissions and remove them if they are not with an attachment OR are not a link (image hosted sites), so I thought it is easiest to just remove text submissions. But my following code doesn't work:

type: text submission 
priority: 1 
title: '.*' 
action: remove 
action_reason: "Missing attachment" 
message_subject: Submission removed
message: "Hey {{author}}, your submission in /r/{{subreddit}} has been removed because it does not include an attachment, maybe you forgot to add it?" 
set_locked: true

Or is there a bette solution? Allow: attachments (direct uploads to reddit, image hosting sites like redgifs.com) Remove: Posts with missing attachments

0 Comments
2024/10/24
21:14 UTC

1

how do i set up Automod to approve posts/comments automatically?

I started a new subreddit, r/US_Urbanism, and i'm trying to set up the automod so that it can approve posts/comments automatically. Just to clarify i will still manually remove/approve posts when needed. How do i do this?

7 Comments
2024/10/24
18:58 UTC

1

Reply to Certain Comments in Certain Threads?

I have what I thought was a correctly formatted automod rule to reply to comments in a certain thread with a set of keywords with another comment, but it’s not working, so any advice would be helpful. The rule as written is:

type: comment
parent_submission:
    title (includes): ‘whomp’
is_top_level: true
body: [‘foo’, ‘bar’]
comment: This is my automatic reply!
11 Comments
2024/10/24
17:36 UTC

1

Setting up a whitelist for subreddit mentions and running into a bit of a snag

I've been working on an AM rule that would filter any content that mentions or links to a subreddit that isn't on the whitelist. It initially looked something like this.

type: any
title+body+url:  
    - 'r/'
~title+body+url: #whitelist
    - 'r/red'
    - 'r/orange'
    - 'r/yellow'
action: filter

After testing it though, I realized that it doesn't work if a subreddit that is on the whitelist is mentioned alongside one that isn't. For example, the comment "visit r/red and r/green" would not be filtered despite r/green not being on the whitelist.

I've spent a bit of time trying to figure out how to make this work, but nothing has worked so far. Does anyone know how to get this working properly or is it even possible to get it to work properly at all?


Update: I figured out how to make it work so that whitelisted subreddit's don't allow non-whitelisted ones to circumvent the filter. It's not pretty looking and might not be the optimal way to do what I'm trying to do, but it does work exactly as I want it to as far as my testing shows.

type: any
title+body+url (regex):  
    - 'r\/(?!red\b)(?!orange\b)(?!yellow\b)\S+'
action: filter
  • The negative lookaheads "(?!...)" act as the whitelist and prevent the rule from triggering on those subreddits, but still allows the rule to trigger when non-whitelisted subreddits are mentioned.
  • A new problem I ran into was that the rule allowed subreddits that shared part of their name with whitelisted ones to circumvent the filter. Adding word boundaries "\b" at the end of each subreddit seems to have fixed that issue.
  • The "\S+" prevents the rule from triggering if someone just writes r/ and requires at least one non-whitespace word to trigger the rule.
  • As far as I can tell, the whitelisted subreddits have to be on the same line, otherwise one line will override the other.
2 Comments
2024/10/24
09:09 UTC

2

How do I enable auto approve post?

Can someone help me? my community is currently set private and idk why it is not working

2 Comments
2024/10/24
08:35 UTC

2

How can I set up an automod to only allow comments on certain post flairs to users with certain user flairs?

E.g. a post is flaired "teachers only," and the automod removes comments from users with the "parent" flair or no flair.

20 Comments
2024/10/24
00:16 UTC

2

Is there a way to write DRY code?

I dislike having to copy/paste the same message if multiple rules should trigger the same automated comment or message. Is there a way to add a saved response, and then have auto moderator look into the saved respone text, so I will not have to find each one and change them individually if I want to change the message?

1 Comment
2024/10/23
01:58 UTC

2

What are some good automod scripts that most people don't know or use?

What are your favorite scripts and most useful.. looking for more ideas that would come in handy.

1 Comment
2024/10/21
05:55 UTC

1

Can you put two things under author? If not, how can I incorporate multiple conditions?

For example, would the following work?

author:
    is_contributor: false
    account_age: "< 3 days"

I sometimes find myself manually approving multiple messages from new users and I would much prefer if after they build some rapport, I could make them an approved user and AutoMod wouldn't take their posts down for being new to the site.

If it doesn't work, what would be the way to accomplish this?

2 Comments
2024/10/21
04:13 UTC

1

Is it possible for automod to remove posts with a certain flair with the exception being the day it was posted?

Sometimes subreddits can get flooded with the same type of content and its really annoying, i want to allow that content only on weekends, if its posted on a weekday i want it to be automatically removed by automod.

5 Comments
2024/10/20
12:58 UTC

3

How to code post title format requirements in the auto mod?

For post titles in my sub they go [gender tag] "the post title" (artist credit). The people in my sub can sort of skirt around this because the auto mod is outdated and hasn't been updated in like 2 years. I want the audomod to do 3 things for post titles.

1.) limit what characters can be used within the brackets[] and between the slashes/ . Any combination of [ M/ W/ Ft/ T ] can be used, but Especially distinguishing between F and Ft

2.) add artist credits between the parentheses(). I know the auto mod can't detect if it's the actual artist or not, but require users to put actual words between the parentheses

3.) To write an actual title. I don't care how long or short, but not to leave it blank. I don't really want post titles to just be [gender tag](artist credit).

I'm not really good with coding or know anything about it to code this myself. If anybody knows a stack overflow forum or GitHub repository that might give me a good start I'd really appreciate it!

3 Comments
2024/10/19
19:29 UTC

2

How can I delete posts that aren't spoilered if they have a certain flair?

I am working on the subreddit for the Finnsfolks 2020 puzzle hunt, and one of the rules say that red herring posts must be spoilered. Is there a possible way to recreate this in Automod?

2 Comments
2024/10/19
12:46 UTC

Back To Top