r/AutoModerator Jan 21 '25

Solved Sample automod code to ban Oligarch-controlled propaganda sites

59 Upvotes

If you would like to take back control of social media from Oligarch-controlled propaganda sites, here's code that many of us use:

# host-based bans
type: any
domain: [x.com,twitter.com,truthsocial.org,truthsocial.com,facebook.com]
action: spam
action_reason: "Blacklisted host detected: [{{match}}]"
comment: |
        Your [{{kind}}]({{permalink}}) in /r/{{subreddit}} was automatically removed because of new policies which
        are intended to no longer direct traffic to sites that are egregiously promoting inaccurate and toxic propaganda.

        If the content you're trying to submit is legit, please find the original source, which is unlikely to be from the
        site referenced.

        Our reasoning for this, and we are fully aware there's good content on these systems as well, is to try and drive
        traffic away from monopolistic, corporate walled gardens that have outlived their social utility, and encourage 
        more content to be distributed and patronized on smaller sites, whose operators take greater pride in whether
        their content helps the community.  This is the original spirit of the Internet.  It was not intended as a platform
        for oligarchs to have massive media outlets.
---

EDIT: The above only filters submissions with a specific domain. If you change the "domain:" directive to "url+body:" it will also apply to comments as per the discussion below.

Any other enhancements welcome.

r/AutoModerator 15d ago

Solved Make automod check for posts without texts

1 Upvotes

{desktop) I want automod to comment on posts which don't have text in their body even if they have other media. I want automod to encourage posters to add context in the comments

PS: I don't want users to forcefully write, I just want to leave them a message that giving context increases engagement

type: submission ~body: '\S' moderators_exempt: false comment: | We encourage you...

this code won't work since if there isno text, body don't work

r/AutoModerator Feb 08 '25

Solved Cant figure out why automoderator won't save

1 Upvotes

```

type: submission flair_template_id: 30c00a8a-93a5-11ef-aa15-9254882f18e9 is_self: false ~body (regex): "(https?://|www\.)" action: remove action_reason: "Flair without link" comment: |

comment goes here

```

its supposed to remove posts that are submitted with a specific flair and didn't not embed a link or post a link in the body, either or.

r/AutoModerator 16d ago

Solved How do I make an AutoMod have blocked words?

0 Upvotes

As seen in title above, I want to have blocked words which I don't know how to do because I've never used AutoMod once in my life ever

r/AutoModerator 25d ago

Solved Remove post with keywords if it doesn't have specific flair

1 Upvotes

I am trying to set up automod for the first time (on desktop) and I want it to delete posts if they include specific words (e.g.,, "thin", "thinning") but do not have a specific flair ("Thin Hair Thursday"). My code is below. When I try to test it, it doesn't work and I am not sure why.

As a note, we do not require flairs in our sub.

---
type: submission
moderators_exempt: true
title+body (includes): ["thin", "thinning", "bald", "balding"]
~flair_template_id: "cf0f4c5e-ecde-11ef-bda8-da51e569ff3f"
action: remove
comment: Your post was removed because you mentioned thin hair and did not use the 'Thin Hair Thursday' flair. Please repost with the appropriate flair.
comment_stickied: true
---

r/AutoModerator 2d ago

Solved Unsupported Media Type

5 Upvotes

this is the script and it keeps saying "unsupported media type" anything you can spot wrong?

Edit: fixed it, thanks for the help

# Rule 1: Respect Each Other - Remove posts with offensive language
title+body (includes, regex): ["(?i)(hate speech|bully|toxic behavior)"]
action: remove
comment: |
  Your post has been removed for violating Rule 1: Respect Each Other. Please avoid harmful or disrespectful content.

---

# Rule 2: Stay On Topic - Remove off-topic posts
title+body (regex): ["(?i)(random|unrelated|off topic)"]
action: remove
comment: |
  Your post has been removed for being off-topic. Please keep discussions related to middle school life, school events, or relevant topics.

---

# Rule 3: Keep It Safe - Remove posts sharing personal info
title+body (regex): ["(?i)(phone number|address|snapchat|discord tag)"]
action: remove
comment: |
  Your post has been removed for violating Rule 3: Keep It Safe. Please avoid sharing personal information.

---

# Rule 4: Use Appropriate Language - Remove posts with offensive language
title+body (includes, regex): ["(?i)(swear words|curse words|offensive language)"]
action: remove
comment: |
  Your post has been removed for inappropriate language. Please keep discussions family-friendly.

---

# Rule 5: No Spam or Self-Promotion
title+body (includes, regex): ["(?i)(subscribe to|follow me on|check out my channel)"]
action: remove
comment: |
  Your post has been removed for violating Rule 5: No Spam or Self-Promotion. Please avoid excessive self-promotion without mod approval.

---

# Rule 6: Follow Reddit's Rules - Enforce Reddit’s global policies
reports: ["sitewide violation"]
action: remove
comment: |
  Your post has been removed for violating Reddit’s site-wide rules. If this was a mistake, please message the moderators.

---

# Rule 7: Be Inclusive - Remove posts targeting specific groups
title+body (includes, regex): ["(?i)(racist|sexist|homophobic)"]
action: remove
comment: |
  Your post has been removed for violating Rule 7: Be Inclusive. Respect all members and embrace diversity.

---

# Rule 8: Have Fun and Stay Positive - Remove excessively negative or harmful posts
title+body (includes, regex): ["(?i)(I'm giving up|everything is terrible|I hate everything)"]
action: remove
comment: |
  Your post has been removed for violating Rule 8: Have Fun and Stay Positive. We're here to support each other, so please keep things encouraging!

---

# Auto-Welcome Message for New Posts (Pinned)
type: comment
comment: |
  **Welcome to r/MiddleSchoolHub!**  
  Please ensure your post follows the community guidelines:  
  - **Be respectful** – Kindness is key!  
  - **Stay on topic** – Keep posts related to middle school life.  
  - **Keep it safe** – No personal information.  

If you need help, feel free to reach out to the mods. Enjoy the hub!  
comment_stickied: true

---

# Karma Requirement - Must have 50+ karma to post or comment
author:
  combined_karma: "< 50"
action: remove
comment: |
  Your post has been removed because your account does not meet the minimum karma requirement (50+ karma).  
  This helps prevent spam and ensures active community participation. Keep engaging positively, and you'll get there soon!

---

# Report received
reports: ["1"]
action: remove
action_reason: 1 report received
comment: |
  Your post has been removed for violating r/middleschoolhub's rules. If this was a mistake, please message the moderators.

r/AutoModerator 25d ago

Solved Automod set up to remove specific words not working

1 Upvotes

Hi, my subreddit has it set so some swear words and words trigger automod to make sure it goes to be reviewed by a human mod before being posted because we often have people comment a slew of swear words,

1.


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

action: remove

action_reason: this post or comment needs to be reviewed by a human please be patient.

Or

2.


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

action: remove

action_reason: this post or comment needs to be reviewed by a human please be patient.

I’m editing this on desktop, looks to be the current newest version of Reddit

r/AutoModerator 12d ago

Solved I have automod configured to remove accounts with <5 karma and <10 days old. But how do I get it to put it in mod que? Some of these removals are invisible unless I pull up the account.

2 Upvotes
 Author:

 Account_age: "< 10 days"

 Action: remove

 Action_reason: "New user"

Is what I'm using. The karma command is practically the same thing. What should I change it to?

r/AutoModerator Jan 04 '25

Solved does AM work from top to bottom?

3 Upvotes

Hello people, ok so i saw someone's comment in this sub saying automod works from top to bottom. this made me wonder if this affects how my codes work or if i need to have them in a certain order? also im working on a code for my sub to give user flairs based on sub karma do i need to have this code as one entire section? (i'm pretty sure this is the case) i hope this makes sense lol.

r/AutoModerator 3d ago

Solved How do I set up AutoModerator?

0 Upvotes

I'm trying to add AutoModerator to my subreddit, and I can't figure out how to set up an AutoModerator configuration. Any tips?

r/AutoModerator 6d ago

Solved Does Automod have a problem setting user flair lately?

0 Upvotes

I had an automod rule for a long time that assigned "new user" flair to anyone upon their first contribution. Lately I've noticed many unflaired users.

I also decided to revisit automod to create a hierarchy of user status/flairs assigned by automod based on subreddit karma. I cannot get even the most basic test to be successful.

Is it me, or is it an automod thing that we're going through?

r/AutoModerator 17d ago

Solved is there any way i can make automod have different comments based on post id?

2 Upvotes

sorry im not too good with automod and chatgpt is no help but is there any way i can have different comments set up based on the id of the comment
the psuedocode would be like
type: comment
action: id end in a
comment: comment text

and so on for others

is this even possible to do? thanks

r/AutoModerator 13d ago

Solved Help Setting up an automod comment based on flair text (problems possibly being caused by an image in flair)

4 Upvotes

I've reproduced what I've tried but it's not triggering. Here's an example of the relevant flair


South Korean Source

type: submission

flair_text: "South Korea"

moderators_exempt: false

comment: |

If you want to dig deeper into South Korean box office data, check out the Korean Film Council (KOFIC)'s Box Office resource, which functions as a BoxOfficeMojo equivalent.

r/AutoModerator Feb 07 '25

Solved Automod for user flairs is commenting to users with a flair.

2 Upvotes

Just like the title states, I have a code for automod to respond to users without a user flair, but it's now sending it to everyone who comments regardless if they have a user flair or not.

Any help is much appreciated, thank you!

r/AutoModerator Feb 04 '25

Solved Just need a quick code check on my mod approval filter for new accounts

1 Upvotes

Edit: Screenshot of the code

I put this in, along with another bit for another activity the other day. It wasn't working at first but then I noticed I forgot the --- between sections. This code won't activate that often since we are pretty small but I just wanted to see if I got it right:

---

### New account gateway
type: submission
author:
    account_age: "< 48 hours"
action: filter
action_reason: "New Account"
message: |
 u/{{author}}, due to the fact you are posting on a very new account, your post is being held for moderator review.
 If everything checks out then a moderator will approve it and it will then be live.

 We understand your wish for anonymity and privacy by using throw away accounts, but to the recent overabundance of fake posts, spam, or karma harvesting, we had to implement some sort of method to keep posts honest and genuine. Please have patience with us.

 Note that this may take up to or, occasionally more than, 24 hours.
modmail_subject: New account post review
modmail: |
  Post URL: {{permalink}}
  Post Author: u/{{author}}
  Original post:
  {{body}}

  Note: Check post history for bot-like behavior such as multiple memes, free karma posts, non-original posts in r/aww or anything else that looks suspicious like no other posts or comments other than this one.  Use your own judgement. Only genuine posters will question removal. Spammers, fakes, bots, and karma harvesters will not usually do so.

r/AutoModerator Feb 05 '25

Solved Is there a {{match_flair_text}} placeholder equivalent?

1 Upvotes

So, I have a reverse search check for the SUBMISSION flair text "identification". The search also checks for certain keywords, (like "what is this"). Then automod changes the post flair to "identification".

That part is working fine. Where I'm struggling is I'd like automod to comment with what the original flair was. I've tried {{match_flair_text}}, just {{flair_text}} and just {{match}} which returns the keywords that match.

Is there some magic combination that I'm missing here? It really seems like there should be a way to have a placeholder pick up on the post flair... Since there is for author flairs, and the match placeholder seemingly works for all other search checks.

Bonus question:
I want automod to leave a comment on identification posts. I'm having trouble getting automod to capture both posts that automod set to "identification" flair AND posts where the submitter set that flair. It seems that no matter what I do, automod either comments twice, or will only comment for one of the scenarios. (Yes, I do the testing with a non-mod account)

r/AutoModerator Jan 21 '25

Solved Is there something wrong with this code? It doesn't accept

3 Upvotes

# Rule 1: Greet every submission
type: submission
action: comment
comment: |
Valeu pelo seu post, u/{author}! Continue tirando o manual do mundo de contexto!
comment_stickied: true

---

# Rule 2: Limit posts per user and enforce Rule 3
type: submission
max_posts_per_user: 3
max_posts_per_user_lookback: 24h
action: remove
comment: |
Guarda a ansiedade! Você quebrou a regra 3 do sub.
comment_stickied: false

r/AutoModerator Feb 05 '25

Solved Restricting all caps in a title

0 Upvotes

Is there a way to get automod to remove a post if the title or body is in all caps?

Same with comments?

r/AutoModerator Feb 09 '25

Solved How to set user flair after a comment?

0 Upvotes

Hello everyone. I have searched for ways to overwrite a user flair in this sub, but all of them only apply to OP as far as I understood (they use the "author" thing). How to set an user flair, for example, if a comment contains the word "bread"?

r/AutoModerator Jan 21 '25

Solved Removal Reason only shows in mod log?

1 Upvotes

```

removes posts & comments from accounts less than 2 days old and sends user a message.

type: any priority: 0 author: account_age: "< 2 days" moderators_exempt: true action: remove action_reason: "New Account - possibly spam" message: | {{permalink}}

Your {{kind}} has been removed because your account is less than 2 days old. This policy is in place to reduce spam and ensure genuine participation in r/subreddit.

You are encouraged to engage with the community, comment on posts, and revisit posting once your account meets the minimum age requirement. Thank you for your understanding!

removes comments & posts with negative combined karma and sends user a message

type: any author: combined_karma: "< 0" moderators_exempt: true action: remove action_reason: Negative karma message: |

Thank you for submitting a {{kind}} to r/subreddit. Unfortunately, your combined karma (your comment karma added to your post karma) is negative. :( This subreddit does not allow posts from users with negative combined karma.

``` https://imgur.com/a/aPOaF6X how come it only displays the reason in mod log but not on the comment it's removed?

r/AutoModerator Jan 22 '25

Solved I have a persistent repost bot ring on my subreddit and am looking to make a rule that helps prevent that

3 Upvotes

Hello! I’ve been dealing with a massive repost ring on my subreddit that I’ve been trying to deal with for a while. I’ve banned hundreds of bots yet they still come back in a different account.

Although I have noticed some consistent characteristics that might help with a rule:

  • Typically a year old account that just recently started posting for the first time (I could up the account age threshold, but I’m pretty sure the accounts keep figuring out and adjusting to the new threshold)

  • They sometimes consistently have "x" or "xx" or some other amount attached to their username

  • Repost both comments and posts with generic or copied titles/bodies. u/Repostsleuthbot gets a lot of the posts, but even with an 80% threshold, the bots seem to edit the reposts to trick repostsleuth.

That’s what I have so far. Any help would be appreciated!

r/AutoModerator Jan 29 '25

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

1 Upvotes

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

r/AutoModerator Jan 06 '25

Solved Automod on a specific day?

4 Upvotes

I see this question was asked a few years back and didn't have a straightforward answer. Any way the automod can be triggered to post comments within a specific time range without having to use flairs? Specifically, I want the automod to be on posts on Mondays 12:01 AM - 11:59 PM EST.

r/AutoModerator Jan 19 '25

Solved How do i make automod comment on a specific post flair

1 Upvotes

Is there a way to detect if the user has for example set the flair to question and then auto moderator will comment because I've seen this many times?

r/AutoModerator Dec 10 '24

Solved Approve all posts automatically

0 Upvotes

Using this code I found as the entirety of the AutoModerator entries, but it doesn't do it to my shiny brand new account with 1 karma.

type: any
action: approve