/r/AutoModerator
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:
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
Hi. Thanks in advance for whatever help you are kind enough to provide. I made an effort to answer these questions on my own (google, this sub, full documentation).
On r/TitlePorn (which isn't porn actually, it's a sub for crossposts with puns in the title), I got a recent karma farming post that wasn't caught by automoderator so I'm thinking I need to improve my automod code.
Removing any post that isn't a crosspost: I saw in the full documentation the top level type "corsspost submission". Does automod action based on type exclusion?
type: ~crosspost submission
action: remove
action_reason: not a crosspost
If not, is there a different way to only allow crossposts?
While I was in the full documentation, I noticed some other useful code (repost, crosspost_title, and is_nsfw):
Removing duplicates: would this sucessfully remove duplicate posts?
type: submission
title: "repost"
action: remove
action_reason: "possible repost"
Preventing OP from rewording a title of a crosspost: can automod use crosspost_title and {{match}} to remove a post if the title of a crosspost does not match the title of the original post? How would I correctly format that rule?
Removing crossposts from nsfw subs: How would I format a rule correctly to remove any crosspost that is from a nsfw sub using "is_nsfw"?
I would like the automod to comment in every post and always appear on the top. What I like to be commented is : PRODUCT LINK SHOULD BE COMMENTED HERE.
is there is also a chance that I could name the automod what I want?
Is there a way to get auto mod to register key words like “selling” or “10k” or something similar, and make a pinned comment or just a normal comment on the post to say “hey, use mod mail for big purchases to avoid scams”?
To celebrate my sub r/500kgofDemocracy reaching 500 members, my community suggested giving each member a special flair to commemorate the event. I would hence like to use AutoMod, if possible, to assign the flair in question to all the 500 members that would've joined up until then.
Two important things:
A dozen of my members already have a user flair and if possible I would like for them to keep it in addition to the commemorative flair.
Will the users be able to remove the flair if they so wish after it getting assigned automatically by AutoMod?
Thanks in advance for the help!
This is the first block, which doesn't seem to do anything. I much prefer it because it's a more specific answer. Is it maybe because type submission is in the wrong order? Many thanks to anyone who can break it down for me.
---
# [23] Salary
type: submission
title (includes): ["Salary", "salary", "Expectations", "expectations", "Salaries", "salaries"]
action: remove
action_reason: Salary Question
comment: Your post has been removed. Ask it in the Megathread. [Click here](https://www.reddit.com/r/Luxembourg/search/?q=megathread&type=link&cId=cf7f9fa1-e1e0-402e-b62e-27511772037e&iId=0619a8cc-16db-403d-9c51-9022d506d481) https://www.reddit.com/r/Luxembourg/search/?q=salary&restrict_sr=1&sr_nsfw= and https://www.luxtimes.lu/expathub/moneyandwork/work/looking-for-a-new-job/1328912.html
This is the second block, which does work.
---
# [25] question touristique ?
title+body (includes): ["cost of living", "salary", "hostel", "hotel", "honeymoon", "travel", "visiting", "visit", "layover", "tourist", "traveling", "propose", "Work with laptop", "work with laptop", "proposal", "apartment", "apartament", "layover", "flight to", "visiting", "tourism", "birthday", "first time", "visiting", "tourists", "1 month", "2 months", "3 months", "4 months", "one month", "two months", "3 months", "4 months", "1 week", "a few days", "2 weeks", "3 weeks", "one week", "two weeks", "three weeks", "arriving", "I am coming", "coming", "wifi", "ISP", "service provider","Does anyone", "New Years Eve", "NYE", "New Year's Eve", "trip", "TRIP", "fiancé", "safe", "neighborhood", "neighbourhood", "third", "job", "jobs"]
type: submission
moderators_exempt: false
action: filter
action_reason: "Automod 1: question touristique ?"
comment: We have a weekly [megathread](https://www.reddit.com/r/Luxembourg/search/?q=megathread&restrict_sr=1&t=month) for common questions. Please use it. Just change the sort from Relevance to New to find the latest one. Please also use the search bar. Just add your search term after r/luxembourg
We want to enable images/gifs in comments on our sub, but only in one post, which has a specific title and type of flair. How can we do that?
What we've been trying to do is enabling imgs/gifs in mod tools, then not allowing imgs/gifs in the entire sub via automod and now we're looking for a code that would exempt this specific post from not allowing imgs/gifs. Is it possible? Or do you know any other way?
I have this right now...
---
moderators_exempt: false type: submission ~title (includes, regex, case-sensitive): ['WHAT', 'HOW', 'XXIX', 'Place', 'Brainfugd', 'Dim', 'Chaoz Fantasy', '(?i:platonic)', '(?i:cellular)', '(?i:eon)', '(?i:revenge)',] action: remove comment: | Your post was removed because the title didn't contain the name of any of the required words!
---
I'm wondering if theres a way that instead of making it so that instead of one of the required words being "Chaoz Fantasy", I could make it that it can include both "Chaoz" and "Fantasy", but not just one of the two words.
For example, if the title said "My Chaoz is Fantasy", it would not get removed, and it wouldnt get removed for "My Fantasy is Chaoz" or just "My Chaoz Fantasy" either. But, if someone titled it "I have a Fantasy" or "I have a Chaoz" it would get removed.
(Keep in mind I do still want it to be optional, there's a list of words subreddit members can choose from. So for example if someone said "WHAT is my Fantasy" that wouldnt get removed, or jsut "WHAT the hell" wouldnt get removed either, since WHAT is also a required word)
Hi there,
On the subreddit I moderate people with a flair are able to summon AutoMod to give pre-made responses (for example !duck
which would give information about ducks.
On this moment I've added the flairs to the code, but is there a way that if a user is either a moderator or approved user they can trigger the commands too; even without a flair being listed under the command in the code.
---
type: submission
comment: |
If this post fits the purpose of r/StardewValleyInspo, then **bold** upvote this post.**bold** If this post is irrelevant to the purpose of r/StardewValleyInspo or contains inappropriate language, **bold**downvote and report this post.**bold**
comment_stickied: true
---
Above is my first rule for my automod. I'm in desperate search of answers so heres a list of my questions (:
**bold**
element correctly?Two main questions.
I found the code here from a previous post when searching how to filter these. I'm not sure if it's filtering both on "Image & Video" posts with images, and also on text posts with images added in.
---
# Image Posts Filtering: Filter posts that include an image
type: submission
moderators_exempt: false
body+title+url (regex, includes): ['\.(gifv?|jpe?g|png)\b', 'gallery', 'image']
action: filter
action_reason: "Thank you for your image post, the moderator team will review shortly: [{{match}}]"
modmail: The above item posted by /u/{{author}} has been filtered for image approval per sub rules.
---
So I've been having a lot of issues with bots / spammers posting links to their random blog articles, etc. I decided to outright block any domains that aren't explicitly whitelisted, as my sub doesn't really see a wide variety of legitimate links anyway.
Here's the basic code I'm using for that --
~domain: [approveddomain.com, approveddomain2.com]
author:
is_contributor: false
action: remove
..
type: comment
url+body (regex): ['https?://(?!\S*(approveddomain\.com|approveddomain2\.com))[\w\.\-]+']
author:
is_contributor: false
action: remove
This is just code I found elsewhere and pieced together. The top code worked for link submissions, but was still allowing links in comments, so I added the second bit of code which is working just fine.
But now I've started seeing an influx of text submissions with links and they're avoiding the automod rules. I thought I could solve that using the same code I use for comments:
type: text submission
url+body (regex): ['https?://(?!\S*(approveddomain\.com|approveddomain2\.com))[\w\.\-]+']
author:
is_contributor: false
action: remove
But it isn't working as expected and is still allowing links to any domain to be embedded in text submissions.
Any idea what I'm doing wrong?
I'd like for automod to be able to make a comment on posts/comments that get reported for a specific subreddit rule. It doesn't have to remove the parent comment, but simply post a message to serve as a reminder of the subreddit rule.
Trying to do this by removing the comments and using reddit's removal reasons and reapproving the comment is tedious. Having an automod rule would help immensely, but I don't know how to write it or if it's even possible. I'd appreciate any help!
I've seen some spam bots that reuse old links for karma. Is there an automod script that can block them and stop them from reusing?
So there are these accounts over 10 days with positive Karma that I'm guessing are hacked. They cross post from their own account. So the link is to the URL Reddit.com and comes from u/#user name here. Is there a way to stop posts from these accounts while still allowing people to crosspost?
Looking for a solution to use automod to trigger crowd control.
I guess I probably could have hacked together a solution using combined_subreddit_karma
, but that feels like reinventing the wheel and not as elegant...
Is this possible? If not, I like this feature would be really helpful for subs to manage influx on specific topics.
Here's an updated take on my automod rules for self-verification of posts - this approach has tremendously cut down on reposting karma farm bots and t-shirt spam.
Prework -
https://www.reddit.com/r/subreddit/about/userflair
-> Click "Settings" and "Enable User Flair" - optionally enable "Let users assign their own user flair"https://www.reddit.com/r/subreddit/about/edit?page=posts
and then find the "Spam filter strength" section.
---
# Auto-approve any submission that has any user flair set
type: submission
author:
flair_text (regex): ['.+'] # user flair is set to any value
action: approve
action_reason: 'Post Approved - user flair set.'
---
# Applies to any new post that doesn't have user flair set
type: submission
author:
~flair_text (regex): ['.+'] # user flair not set
comment: |
Hello /u/{{author}}!
Don't worry, you didn't do anything wrong! It just looks like this is either your first post to our subreddit, or it's the first post since our recent approval process change as part of our ongoing efforts to reduce spam. In order for your post to be approved and to show us that you're not a spam account, please reply to **this comment** with the words "`I agree`" and the reddit automoderator will approve your post, as well as any future posts you make.
Thank you!
message_subject: "Action Required re: your recent submission to /r/{{subreddit}}"
message: |
Hello /u/{{author}}!
Don't worry, you didn't do anything wrong! It looks like this is your first post to /r/{{subreddit}} (or your first post since our recent approval process change) In order for your post to be approved and to demonstrate you are a human and not a spammer, please view your post by clicking [here]({{permalink}}). You should see a comment from the Reddit automoderator with instructions to follow.
Thank you!
---
# User replies "I agree" to automoderator comment - the post is approved and "New poster" flair is added for them.
type: comment
body (regex): ['\bagree.*']
is_edited: false
author:
is_submitter: true
~flair_text (regex): ['.+'] # Flair_text is currently blank
set_flair:
template_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # ID for "New poster" flair
comment: |
Thank you and welcome to our community! Your post has been approved and should be visible to other users at this time. Your future posts will automatically be visible.
parent_submission:
action: approve
action_reason: 'Post Approved - New poster.'
---
# Identify and promote (update flair) when someone makes their second post
type: submission
author:
flair_template_id: [xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx] # User flair is currently "New poster"
set_flair:
template_id: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyyyyy # setting them to "Contributor"
overwrite_flair: true
action_reason: 'Post Approved - user promoted to contributor.'
That's it!
I still recommend reviewing the mod queue from time to time looking for submissions with multiple comments (to find posts where the user is *trying* to follow instructions and having problems.
Welcome to r/ . Please keep it civil. If you have any question, then contact the MOD team. Thanks
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
recently became mod of a small subreddit and want to add the AutoModerator and I have a few questions about it
how do I add it?
how do I make him say an automated message (example: "if this post breaks any rules delete it")
how can I make it delete some posts automatically?
I made a nudist group that is inundated with low karma porn bots. This is supposed to be a safe place for local nudists and more than anything I get onlyfans ads, often copying legit post titles.
There's a subreddit feature where Mods can enable/disable images in comments if you are a Moderator of a subreddit that is not nsfw, which mine isn't.
"Mod Tools" -> "Settings" -> "Post and Comments" -> "Media In Comments" -> "Images"
However, I don't want to universally enable images in comments for all users, due to a multitude of reasons like low quality meme spam. I would like only mods to be able to include images in a comment. Does anyone know how to do accomplish this, either by the settings or an AutoModerator configuration?
I'm trying to mess around with the syntax "moderators_exempt: true" in AutoModerator, but I can't seem to get it to do exactly what I want.
---
type: gallery submission
moderators_exempt: true
action: remove
---
The above command should disable image posts for all users, with Moderators being exempt from the rule, but I couldn't find the equivalent for image comments. If anyone could assist me, I would really appreciate it.
I want the users with user flair "Verified Store" to be ignored by auto mod rule 1 2 3 but not ignore by rules 4 5, how I can do that?
# RULE 1 CQS score
# Rule 2: New Account Filter
# Rule 3: Low Karma Filter for posts only
# Rule 4: Common Spam Keywords in Title and Comments
# Rule 5: Disallow Crossposts
Primarily, I wish to keep the "I am a bot, and this action was performed automatically." after each automod action.
But the invitation to argue about it :
Please contact the moderators of this subreddit if you have any questions or concerns.
is confusing to users and needs to be removed as there is plenty of info given in the custom text,
and can lead some people into feeling tricked when no debate is entertained.
I know this question has been asked and answered in years past.
But is there anything new on this issue?
Thank you.
What I have set:
type: comment
author:
name: [name1, name2]
action: approve
I'm trying to make it so if someone is restricted by another automod rule (account age for example), they can be approved to the automod and still be able to comment.
This command is not working as the comments are getting removed and that is even after I moved this command to the very top of the auotmod page.
Any ideas on how to get this to work?
Hi folks,
Our Private sub has added a new rule, not allowing links to posts from our sub to be shared on other subs.
I came across the TotesMessenger in the AutoMod wiki, and have been trying to add it to the AutoModerator to alert us of external link shares.
I have added the following rule to our AM code:
---
# Reports sharing private links on other subs via modmail
author: [TotesMessenger]
body (regex, includes): ['\[(/r/\w+)\] \[(.+)\]\((https?://\w+\.reddit\.com/\S+)\)']
action: remove
action_reason: "Remove {{author}} comment after reporting thread, {{author}} is our friend [{{match-2}}]"
modmail_subject: "Submission linked from {{match-body-2}}"
modmail: |
The following thread in /r/{{subreddit}} has been linked in {{match-body-2}}:
**Original:** [{{title}}]({{permalink}})
**Meta post:** [{{match-body-3}}]({{match-body-4}})
---
Questions:
Apologies if I am misunderstanding the functionality of TM here, appreciate any push in the right direction here :)
I took down my automod so I could clean up my spaghetti code, but I had the foresight to copy that code. I am trying to get my automod to accept my new code and it won't, whatever, formatting probably, but then I try to paste the code I have from before and it won't accept that either. I tried to break up my original code into each
---
segment
---
but it still won't take the code. Help me out?
My subreddit has a script for the automod to post a comment on every image post with a general message and sub rules, however it doesn’t work run when the user submits multiple pictures. Can anyone help? My script is as follows:
—
type: submission
type: link submission domain: [i.redd.it, preview.redd.it, old.redd.com, imgur.com, instagram.com, tiktok.com] url (includes-word, regex): ['.=', 'i.redd.it', 'imgur.com', 'ibb.co', 'prnt.sc', 'postimg.cc', 'imgbox.com', 'imageupload.io', 'instagram.com', 'instagr.am', 'fbcdn.net', 'flickr.com', 'giphy.com', 'gfycat.com', 'media.tumblr.com']
comment: |
Text here
If someone comments "Bad!' on a post, send it to modmail.
Is this possible?
Hi,
In my subreddit we want to block everything for review that contains karma and free, but the current code blocks everything that contains karma or free.
type: submission
body (includes-word): ["free", "karma"]
action: filter
modmail_subject: "Post flagged for restricted terms"
modmail: |
Your submission has been flagged for containing restricted terms and has been sent to the moderators for review. Discussing karma-sharing subreddits is against Reddit's Terms of Service (ToS) and is not allowed on this subreddit. Please refrain from such discussions in the future.
Currently having an issue with the following code:
# Title Formatting
type: submission
~title (regex): ['(1[89]|[2-9]\d)*\s*\[([TFMG]|NB)4([TFMGA]|NB)\]']
action: remove
action_reason: 'Incorrect Title Formatting'
priority: 85
The code should force submission titles to have a numerical age between 18 and 99, and also require a gender tag between square brackets. However, it isn't removing submissions that lack an age. I'm sure it's just some slight formatting thing but I'm having trouble seeing it. Thanks!
I have an image filter setup for reddit image posts. However, some posts are submitted as galleries, they link to old.reddit.com. Is there a way to filter there?
I'd also be interested in filtering image links within the body of posts. These: https://preview.redd.it/
I currently filter link submissions for "i.redd.it" and I'm not sure this will catch "preview.redd.it" in the body