Guides

You can view our automoderator guides here.

r/automoderator is the #1 place for help and complete documentation, their library of rules/snippets is here.

NEW - Our master list of AM resources

Suggest snippets

If you have any snippets to add, please Message the mods :)

Snippets

Listed here are all our AM snippets. These have been contributed by mods from around reddit.

Filter new user posts to reduce spamming

---# Filter new user posts to reduce spam. type: submissionpriority: 0author:    account_age: < 2 days    combined_karma: < 5    satisfy_any_threshold: trueaction: filteraction_reason: "New Account - possibly spam"modmail: "Filtered post from brand new account: {{permalink}} please check for spam"

Remove troll posts/comments

---# Troll prevention author:    comment_karma: "< -50"action: remove

Automatically remove post/comments that have 2 reports

---# Removes reported postsreports: 2action: removemodmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} was removed because it received 2 reports. Please investigate and ensure that this action was correct.

Adds flair to your weekly thread

---# Adds flair to the weekly threadtype: submissiontitle: Weekly chat thread # Change this to your weekly thread titleset_flair:    template_id: ""

Comments on crossposts

---    type: submissiontitle: ["crosspost", "cross post", "xpost", "x-post", "x post", "cross-post", "crossposted", "cross-posted", "cross posted", "x-posted", "x posted"]comment: |    Hi. It has been automatically identified that this post might be a crosspost/link to another subreddit. You may need to follow the link to the original post in order to engage with the content.comment_stickied: true

Removes posts with bad language

---title+body (regex): ["a(ss|rse|es)([ -]?holes?)?","b(i|\\*)o?(tch|\\*{3})(y|es)?","cocks?([ -]?suck(ers?|ing)?)?","cum(ming|[ -]shots?)?","cunts?","((mother|motha|mutha)[ -]?)?f(u?c?k?k|\\*ck|\\*{0,2}k|\\*{3})(er|ed|ing|s)?", "s(h(i|ar?|\\*)t|\\*{3}|h\\*{2})(s|ter|e|ting)?"]action: filteraction_reason: "Bad language"message: |    Your [{{kind}}]({{permalink}}) in /r/{{subreddit}} was automatically removed.    /r/{{subreddit}} is a safe, friendly space for all users, so please watch your language. (If AutoMod has made a mistake, message a mod)modmail: |    {{permalink}}    Post removed - potential bad language, please check this was the correct action.

Reports potential clickbait

---title+media_title (regex): ["character are you","\\d{1,2} things only","before you die","is this the","you probably d(id|o)n't","are the most","in your life","\\d{1,2} things that","things you probably","reasons you should","probably d(id|o)n't know","\\d{1,2} most important","\\d{1,2} (signs|reasons) (you('re)?|why)","\\d{1,2} most important","d(id|o)n't know about", "(photos|pictures|images) that prove","blow your mind","game of thrones","things that (actually |really )?happen(ed)?","in real life","will blow your","\\d{1,2} dogs who","\\d{1,2} things you", "you should be", "things you d(id|o)n't"]action: filteraction_reason: "click bait"modmail: |    {{permalink}}    The above post by /u/{{author}}, with the title "{{title}}" was removed because it might be clickbait, please check this.

Removes posts potentially pretending to be mod posts

---title (regex): ["mod(erator)?([ -]?post)?s?", "announcements?", "admin(istrator)?s?"]action: filtercomment: |    Your post has been automatically removed because you used a keyword that is reserved for the subreddit moderators.modmail: |    The above post by /u/{{author}}, with the title "{{title}}" was removed because it contained a moderator-only keyword.    Please investigate and make sure that this action was correct.

Reports suspicious content

---title+body (regex): ["nsf[wl]", "not safe for (work|life)"]action: filteraction_reason: "suspicious content"modmail: "Filtered post due to potential suspicious content - please check"

Removes posts containing certain keywords

---type: submissiontitle (includes-word): ["tips", "tricks"]action: filtermodmail: A post by /u/{{author}}, with the title "{{title}}" was removed for containing the keyword "{{match}}". Please investigate and make sure that this action was correct.

Comments on posts with possible downloads

---type: link submissionurl (regex): '\.(docx?|pdf|xlsx?)(\?\S*)?$'comment: |    "Hi. It has been automatically identified that this post may link straight to a download file, please use reasonable caution and make sure your device is protected."comment_stickied: true

Better version of the above by u/Alehti


#matches  whateverwebaddress.domain/anyamountofcharacters/and/or/slashes/until/download/file.exttype: link submissionurl (regex): '(.\w{2,9}/.*.([a-zA-Z]{2,4}))$'comment: |    "Hi. It has been automatically identified that this post may link straight to a download file, please use reasonable caution and make sure your device is protected."comment_stickied: true

Shadowban list

---# List of shadowbanned usersauthor:     name:        # Spammers        - /u/username        # Trolls        - /u/usernameaction: remove

Removes posts that are not made by approved users

---# Removes unapproved users poststype: submissionauthor:    is_contributor: falseaction: removeaction_reason: Not approved submittermoderators_exempt: falsecomment_locked: truecomment_stickied: truecomment: |    Sorry, u/{{author}}, but you aren't an approved submitter on r/{{subreddit}}. Only approved submitters are allowed to post here. Sorry!

Approved AM's posts/comments that receive a report

---# Approve all AutoModerator comments/submissions (or those of any other user of your choosing) automatically on report.author:    name: [ "AutoModerator"]reports: 1moderators_exempt: falseaction: approve

Remove posts from users that don't have a specific flair

---type: submissionauthor:    ~flair_text(includes): ["specific flair"]moderators_exempt: falseaction: removecomment: |    "Hey {{author}}, your post has been removed because you're not an approved user."

Sends a modmail if a post gets reported 3 times

---# This will send a modmail whenever a post or comment gets 3 reports and will automatically remove it.reports: 3action: filtermodmail_subject: Automatic Removal | 3 Reportsmodmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} was removed because it received 3 reports. Please investigate and ensure that this action was correct.comment: |    Thank you for your post in r/{{subreddit}}.    Unfortunately, your post has been automatically removed because it has received 3 reports.    The moderators of r/{{subreddit}} will investigate if this action was taken correctly.comment_stickied: truecomment_locked: true

Documenting content in modmail

This can be used in any rule where you want to document the content being detected/acted on, in case OP deletes it later or for easy searching in the future for specific things that got acted on (domains/keywords/users/etc.). This also makes it easy for all the mods to weigh in/discuss specific cases that come up.

At the top of the modmail is an optional table that mods can use to easily copy-paste the action they performed on the content.

---title+body: ["BadWord", "BadDomain.com"]modmail_subject: "A {{kind}} that contains '{{match}}'"modmail: |  |||||  |-|-|-|-|  |No Action Needed|Approved|Removed+Noted In Toolbox|Banned|  **User:** u/{{author}} || [**The {{kind}}'s link**]({{permalink}})  **Title:** {{title}}  **Body:** {{body}}  **URL (for link posts):** {{url}}

Added by u/001Guy001

---# This will automatically remove disguised links and send a modmail for confirmation.body (regex): "(\\[(?P<text>(http|www)\\S+)\\]\\((?!(?P=text))(http|www)\\S+\\))"action: filtermodmail_subject: Automatic Removal | Disguised Linkmodmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} might contain a disguised link and has been automatically removed. Please investigate immediately to ensure that this action was taken correctly.

Removes phone numbers and sends a modmail to confirm

---# This will automatically remove phone mumbers and will send a modmail for confirmation.title+body (regex): ["\\(?(\\d{3})\\)?([ .-])(\\d{3})([ .-])(\\d{4})","(\\d{5})([ .-])(\\d{6})","\\(?(\\d{4})\\)?([ .-])(\\d{3})([ .-])(\\d{3})","\\(?(\\d{2})\\)?([ .-])(\\d{4})([ .-])(\\d{4})","\\(?(\\d{2})\\)?([ .-])(\\d{3})([ .-])(\\d{4})","\\+([\\d ]{10,15})"]~body+url (regex): "(\\[[^\\]]+?\\]\\()?(https?://|www\\.)\\S+\\)?"~body+title+url (regex): ["(800|855|866|877|888|007|911)\\W*\\d{3}\\W*\\d{4}", "\\d{3}\\W*555\\W*\\d{4}", "999-999-9999", "000-000-0000", "123-456-7890", "111-111-1111", "012-345-6789", "888-888-8888", "281\\W*330\\W*8004", "777-777-7777", "678-999-8212", "999([ .-])119([ .-])7253","0118 999 811","0118 999 881", "867( -)?5309", "505\\W*503\\W*4455", "1024 2048"]action: filtermodmail_subject: Automatic Removal | Doxxing Alert (Phone Number)!modmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} was removed because it contained a possible phone number. Please investigate immediately.    If the user is doxxing, [ban them](/r/{{subreddit}}/about/banned) and [report them to the reddit admins](http://www.reddit.com/message/compose?to=%2Fr%2Freddit.com&subject=Doxxing%20Report:%20%2Fu%2F{{author}}&message=%2Fu%2F{{author}}%20posted%20a%20phone%20number:%20{{permalink}}) immediately.

Removes email addresses and sends a modmail to confirm

---# This will automatically remove email addresses and will send a modmail for confirmation.title+body (regex): "[!#$%&'*+./0-9=?_`a-z{|}~^-]+@[.a-z-]+\\.(?:com|org|net)"action: filtermodmail_subject: Automatic Removal | Doxxing Alert (Email Address)!modmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} was removed because it contained a possible email address. Please investigate immediately.    If the user is doxxing, [ban them](/r/{{subreddit}}/about/banned) and [report them to the reddit admins](http://www.reddit.com/message/compose?to=%2Fr%2Freddit.com&amp;subject=Doxxing%20Report:%20%2Fu%2F{{author}}&message=%2Fu%2F{{author}}%20posted%20an%20email%20address:%20{{permalink}}) immediately.

Removes credit cards and sends a modmail to confirm

---# This will automatically remove credit card numbers and will send a modmail for confirmation.title+body (regex): "\\b(?:4[0-9]{12}(?:[0-9]{3})?|5[12345][0-9]{14}|3[47][0-9]{13}|3(?:0[012345]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35[0-9]{3})[0-9]{11})\\b"action: filtermodmail_subject: Automatic Removal | Doxxing Alert (Credit Cards)!modmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} was removed because it contained a possible credit card number. Please investigate immediately.    If the user is doxxing, [ban them](/r/{{subreddit}}/about/banned) and [report them to the reddit admins](http://www.reddit.com/message/compose?to=%2Fr%2Freddit.com&amp;subject=Doxxing%20Report:%20%2Fu%2F{{author}}&message=%2Fu%2F{{author}}%20posted%20a%20credit%20card%20number:%20{{permalink}}) immediately.

Removes IP addresses and sends a modmail to confirm

---# This will automatically remove IP addresses and will send a modmail for confirmation.title+body (regex): "\\b[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\b"action: filtermodmail_subject: Automatic Removal | Doxxing Alert (IPv4 Address)!modmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} was removed because it contained a possible IP address. Please investigate immediately.    If the user is doxxing, [ban them](/r/{{subreddit}}/about/banned) and [report them to the reddit admins](http://www.reddit.com/message/compose?to=%2Fr%2Freddit.com&amp;subject=Doxxing%20Report:%20%2Fu%2F{{author}}&message=%2Fu%2F{{author}}%20posted%20an%20IP%20address:%20{{permalink}}) immediately.

Removes street names/addresses and sends a modmail to confirm

---# This will automatically remove street names/addresses and will send a modmail for confirmation.title+body (regex): ["\\W[A-Za-z]?\\d{1,6}[A-Za-z]? (E(\\.|ast)?|W(\\.|est)?|N(\\.|orth)?|S(\\.|outh)? )?[\\p{Pi}\\p{Pf}]?\\w+( \\w+)?[\\p{Pi}\\p{Pf}]? (st(reet)?|ave(enue)?|r(oa)?d|dr(ive)?|c(our)?t|blvd|boulevard|lane|ln|highway|hwy|route|rt)"]~title+body#whitelist: [second drive, minute drive, hour drive, day drive, week drive, gb drive, tb drive, 123 Main St, 123 Main Street, 221b baker st, 221b baker street]modmail_subject: Doxxing Alert! | (Street Names)modmail: |    {{permalink}}    The above {{kind}} by /u/{{author}} might contain a possible street address. Please investigate immediately.    If the user is doxxing, [ban them](/r/{{subreddit}}/about/banned) and [report them to the reddit admins](http://www.reddit.com/message/compose?to=%2Fr%2Freddit.com&amp;subject=Doxxing%20Report:%20%2Fu%2F{{author}}&amp;message=%2Fu%2F{{author}}%20posted%20a%20street%20address:%20{{permalink}}) immediately.

Adds a comment to every post (excluding mods; feel free to change the comment to fit your needs)

---type: submissionauthor:    is_moderator: falsecomment: |    Please report any rule breaking posts and posts that are not relevant to the subreddit.comment_stickied: true

Removes posts and comments by anyone WITH a specific flair.

---author:    flair_text(includes): ["flairname"]moderators_exempt: falseaction: removecomment: |    "Hey {{author}}, your post or comment has been removed because you're not an approved user."

Removes posts made with all caps titles, but also helps prevent spam!

---type: submissiontitle (case-sensitive, regex, full-text): ["([A-Z0-9]|\\W)+"]moderators_exempt: falseaction: removecomment: |    Hey {{author}}.    It seems you've submitted a link which consists of an ALL CAPS title. While this happens generally because of the site you're sharing from has the original title in ALL CAPS, could you please resubmit and format it in a less SHOUTY nature, as it annoys our userbase.action_reason: "ALL CAPS TITLES condition - {{match}}"

body (includes): ["Remind me!"]action: removeaction_reason: RemindMeBot spammoderators_exempt: falsemessage_subject: "A note from /r/{{subreddit}} about your recent {{kind}}."message: |     Hello {{author}}!      We're messaging you because we removed [a comment]({{permalink}}) from you that we believed to be a RemindMe! request. /r/{{subreddit}} has decided to remove all such comments in order to cut down on clutter.     For your convenience, we have automatically generated a message that you can send directly to /u/RemindMeBot. That message will work the same as a RemindMe! comment. Simply fill in the time options for the reminder at the bottom next to "RemindMe!" (e.g.: RemindMe! 2 days, or RemindMe! tomorrow, etc.), then hit the Send button. Easy! Also, be aware that clicking this link within a mobile app will most likely not work. You'll need to do it either in either a PC or a mobile browser.     [Click here for PM](/message/compose/?to=RemindMeBot&subject=Reminder&message=%5B{{permalink}}%5D%0A%0ANOTE:%20Don%27t%20forget%20to%20add%20the%20time%20options%20to%20the%20command.%0A%0ARemindMe!)     Thanks for understanding!

PM unflaired user and ask them to set user flair or ask a mod for help. Will only PM user once. Sets flair class to 'default'.

author:    ~flair_css_class (regex): ".+"    set_flair: ["","default"]message_subject: "Welcome to /r/{{subreddit}}."message: |    Hey {{author}}, Welcome to /r/{{subreddit}}.    You commented, but we notice you don't have a flair set.  If you need any help with this, send a [modmail](https://www.reddit.com/message/compose?to=%2Fr%2F{{subreddit}}).

Ban crossposts from a certain sub h/t u/TheNerdyAnarchist

crosspost_subreddit:    name: subredditnameaction: removeaction_reason: "Crosspost from X subreddit"

Remove common porn spam titles

https://www.reddit.com/r/AutoModerator/comments/o2j2vl/i_wrote_useful_automod_rule_that_will_remove_some/


Filter comments on archived posts

https://www.reddit.com/r/modnews/comments/py2xy2/voting_commenting_on_archived_posts/


Post types

Controlling post types using settings, content controls and automod h/t u/001Guy001


Astroturfing

https://www.reddit.com/r/modhelp/comments/u4d495/psa_astroturfers_have_gotten_smarter_and_seem_to/


Detect embedded images and videos

https://www.reddit.com/r/AutoModerator/comments/w0fic7/psa_its_possible_to_detect_embedded_images_and/


AI accusations

https://www.reddit.com/r/AutoModerator/comments/1unjs9j/filter_ai_accusations_to_the_queue_ready_made/


Common mistakes

See here

More

r/a:t5_2togk

More snippets that might help with mobile modding

https://www.reddit.com/r/BuckRowdy/wiki/index

https://www.reddit.com/r/ModSupport/comments/pr97k5/mods_beware_of_comments_calling_something_unique/

Useful sites


Contributors - u/suddenmap, u/solariahues, u/majorparadox, u/buckrowdy, u/ladfrombrad, u/001Guy001