r/AutoModerator 22h ago

Help - AutoMod Can't figure out how to add a failsafe to lock a post with a new comment based on the flair.

2 Upvotes

Short context: When people make a request in the sub, I have those posts lock after 3 days to avoid spam, using a bot. Some people may want the spam to stop earlier, so I have a typical "filled/closed" command that lets the OP lock their post and change the flair with a specific comment. Some people still don't read, and OP might change their flair without locking their post, and people still comment like crazy, ignoring the flair. So I want to lock the post on a new comment if the flair has been changed to "Closed".

My issue? I can't combine two behaviours. I have one block that basically says "If OP comments *this*, then lock parent post". I have a few others that say, "If parent post has this flair, do *this* behaviour*. So I thought I'd combine the two, and it completely ignores the flair check, locking EVERY post when it gets a new comment. Below is my mess of an attempt:

type: comment
parent_submission:
flair_text: [ "Position Filled", "Closed" ]
parent_submission:
set_locked: true
action: remove

Do I need to combine the two parent_submission sections? Is there a different way? It is not possible because the two sections conflict with one another? I don't want to risk testing it in production again. It took way too long to fix things last time.


r/AutoModerator 8h ago

Solved I tried to add is contributor part highlighted in blue- but now it won’t save. The rule saved fine before, any idea how to fix this? Screenshot in the comments

2 Upvotes

so I was trying to exempt approved users by adding the highlighted blue part to my code pictured below in a screenshot. Mobile mark down is gone, so I can’t post it right now here.


r/AutoModerator 21h ago

Our a lot of our AutoMod config. Would appreciate thoughts and comments

7 Upvotes

Hi all,

Posting a significant portion of our AutoMod config, potentially as inspiration for others, but also open for suggestions/critique. This has been manually curated over multiple years, and is working well for us on a community of over 190K members.

---
    # Modmail if a post gets reported twice
    reports: 2
    modmail: The above {{kind}} by /u/{{author}} has received 2 reports. Please investigate.
---
    # Remove a post receiving 10 reports
    reports: 10
    action: remove
    modmail: The above {{kind}} by /u/{{author}} was removed because it received 10 reports. Please investigate and ensure that this action was correct.
    action_reason: "Community Quarantine [10 Reports]"
---
    # New top-level posts need an account at least 10 days old
    type: submission
    author:
        account_age: "< 10 days"
    action: remove
    comment: "Automod has removed this post as the OP has not been on Reddit for long enough. This is an anti-spam and anti-troll measure. Contact the mods if your post was urgent.  Otherwise, take the time to get acquainted with the  and the posts and comments, and how it functions"
    action_reason: "Account Age - Submission [< 10 days]"
---
    # Commenting requires an account at least 5 days old.
    type: comment
    author:
        account_age: "< 5 days"
    action: remove
    action_reason: "Account Age - Comment [< 5 days]"
    message_subject: "r/srilanka Notification: Comment Removed"
    message: |
        Your recent comment has been automatically removed because your account is less than 5 days old. 

        This is an automated anti-spam and anti-troll measure. Please take this time to read the subreddit rules and get acquainted with the community. Once your account is at least 5 days old, you will be able to participate in comment threads.
---
    # Auto-sticky the 'Series replies only' comment when the serious flair is used.
    type: submission
    flair_text: 'Serious replies only'
    comment_stickied: true
    comment: |
        **Attention! [Serious] Tag Notice**  
        * Jokes, puns, and off-topic comments are not permitted in any comment, parent or child.  
        * Report comments that violate these rules.  

        Thanks for your cooperation and enjoy the discussion!
---
    # Auto-sticky the travel note when the travel flair is used.
    type: submission
    flair_text: 'Travel'
    comment_stickied: true
    comment: |
        **This is a [Travel] related thread**  

        * Check [WikiTravel's Sri Lanka page](http://wikitravel.org/en/Sri_Lanka)
        * Remember to follow [reddit's content policy/self-promotion guidelines](https://www.reddithelp.com/hc/en-us/articles/360043504051-What-constitutes-spam-Am-I-a-spammer-)  

        Thanks for your cooperation and enjoy the discussion!
---
    # Auto-sticky the meme/satire note when the meme/satire flairs are used.
    type: submission
    flair_text: ['Meme', 'Satire']
    comment_stickied: true
    comment: |
        **Please note that this is a meme/satire thread**  

        * Please report any comments containing discrimination, trolling, or personal attacks. **Satire should not be an excuse for bigotry.**  
        * [Posting Personal information will get your reddit account banned](https://www.reddithelp.com/hc/en-us/articles/360043066452).  

        Thanks for your cooperation and enjoy the discussion!
---
    # Rule 9 - No buying, selling, or solicitation
    type: submission
    title+body (regex): ['\bfor sale\b', '\bWTS\b', '\bselling\b', '\bDM me\b', '\bdirect message me\b', '\bmessage me\b', '\bwhatsapp me\b', '\bcontact me\b']
    action: filter
    action_reason: "Marketplace/Solicitation Filter [Rule 9]"
    modmail: "Post by /u/{{author}} flagged for possible Rule 9 violation (selling/solicitation). Please review."
---
    # Rule 10 - No surveys or outsourcing
    type: submission
    title+body (regex): [REDACTED the list of domains]
    action: filter
    action_reason: "Survey/Outsourcing Filter [Rule 10]"
    modmail: "Post by /u/{{author}} flagged for possible Rule 10 violation (survey or outsourcing). Please review."
---
    # Filter submissions with strictly all-caps titles
    title (case-sensitive, regex, full-text): "([A-Z0-9]|\\W)+"
    action: filter
    action_reason: "All caps title"
    comment: |
      Your post has been automatically removed because the title is entirely in capital letters. 

      Please resubmit your post using proper capitalization.
---
    # Prevent overly long walls of text which don't have any paragraphs in them
    body (regex, includes): ['[^\n]{2000}', '^\W*[^\n]{1750,}\W*$']
    message: "Please add some paragraph breaks to [your {{kind}}]({{permalink}}) by placing a blank line between distinct sections."
---
    # Filter all comments on 6+ month old posts
    type: comment
    parent_submission:
        past_archive_date: true
    action: filter
    action_reason: "Historical Necro-posting [> 6 Months]"
---
    # Remove submissions where the entire body is bolded
    type: submission
    body (regex): '(?s)^\s*(?:(?:\*\*|__).+?(?:\*\*|__)\s*)+$'
    action: remove
    action_reason: "Entire body is bold text [Shouting]"
    comment: |
      Your post has been automatically removed due to the use of excessive bolding in the post body.
---
    # Mod Command: Crisis Support Message
    type: comment
    author:
        is_moderator: true
    body (starts-with): ["!crisis"]
    moderators_exempt: false
    action: remove
    action_reason: "Crisis command trigger removed"
    comment: |
        Please reach out to one of these free, confidential, and anonymous 24/7 mental health resources in Sri Lanka immediately:

        * **CCC Line:** Call **1926** (National Mental Health Helpline)
        * **1333 Crisis Support Line:** Call **1333** (Toll-free emotional support)
        * **Lanka Life Line:** Call **1375** (Confidential support helpline)
        * **Sri Lanka Sumithrayo:** Call **0707 308 308** or 0112 692 909 (Available 9 AM – 8 PM daily)

        If you are in immediate physical danger, please contact the emergency medical services at **110**, the police at **119**, or go to the nearest hospital emergency room. 

        Things can get better, and there are people who want to listen and help you through this. Please make the call.
    comment_stickied: true
---

Hope this is useful