

[Unofficial Reddit mod help] Mods helping mods be better mods! | We offer guides and resources for mods, plus ModTalks. Help for mods, by mods :D
AutoModerator: What it is and how to set it up!
AutoModerator: What it is and how to set it up!
Hello fellow moderators! This here is a basic guide of u/AutoModerator and its capabilities.
What is AutoModerator?
AutoModerator (aka AutoMod) is a built-in bot made by u/Deimorz that can be used for automating various tasks that it can do for you. Pretty neat huh?
How do I set it up?
To do that, you need to have wiki and config permissions on your subreddit. If you created the sub, your all set! If you don't, unfortunately, you can't set up AutoMod. Try asking a mod above you to change your permissions.
Next, you need to create your AutoMod config page. This is where all your rules will be listed. To create that, you need to visit your wiki/config/automoderator page. For example, if I moderated r/GalaxyS9, then I would go to https://reddit.com/r/GalaxyS9/wiki/config/automoderator. Just change the GalaxyS9 to your subreddit name. Now hit that Create Page button!
Now that you have your AutoMod config, you can now set up rules!
What should a rule look like?
AutoMod's rules are defined in YAML, a coding language. Each rule is separated with exactly 3 hyphens, like this: ---
. If you never coded before, it may be confusing. But once you learn how to use AutoMod, you'll be a master in no time!
You can add comments to your config. Comments are lines of code that are not read by the program but are perfectly visible by a human. You can add a comment by adding a hashtag and writing after it.
# A comment looks like this!
Common AutoMod Rules
Here are some common AutoModerator rules that lots of subreddits use (credit to u/JuulH for the snippets!). You can copy and paste them without modifying them.
Removes posts and comments from accounts that are less than a day old (used for combating spammers):
# Removes submissions (posts & comments) from accounts that are less than 1 day old. Modmail is optional, if you don't have too much submissions you can check if the post is ok and manually re-approve it. author: account_age: "< 1 days" # Yes, it should be "day", but AM requires it that way action: filter # Feel free to remove the modmail_subject and modmail part if you don't want AutoMod to alert you about it modmail_subject: Automatic Removal | New Account modmail: | {{permalink}} The above {{kind}} by /u/{{author}} has been automatically removed because the author's account is less than 1 day old. Please investigate immediately to ensure that this action was taken correctly. ---
Removes post and comments from accounts with less than 10 combined karma (link and comment together):
# Removes submissions (posts & comments) from accounts that have less than 0 comment karma. Modmail is optional, if you don't have too much submissions you can check if the post is ok and manually re-approve it. author: comment_karma: "< 0" action: filter # Feel free to remove the modmail_subject and modmail part if you don't want AutoMod to alert you about it modmail_subject: Automatic Removal | New Account modmail: | {{permalink}} The above {{kind}} by /u/{{author}} has been automatically removed because the author's account has less than 0 karma. Please investigate immediately to ensure that this action was taken correctly. ---
Sends a modmail if a post/comment is reported
# This will send a modmail whenever a post or comment gets a report. reports: 1 # Feel free to change it to however many you want to fit your needs modmail_subject: Post has received 1 report. modmail: | {{permalink}} The above {{kind}} by /u/{{author}} has received a report. Please investigate. ---
That's all I can include for now! Many more snippets are listed at the wiki! Please remember that they will not work when using a mod account unless you add moderators_exempt: false
at the end of the rule!
Resources
There are plenty of resources to help you on your journey for AutoModerator.
-
r/AutoModerator - a subreddit dedicated to AutoMod where you can ask questions
-
Full Documentation - a more in-depth explanation of making rules for AutoMod
-
Common AutoModerator Rules - A library of even more rules that are common in subreddits
I hope you enjoyed this guide! Make sure to check out the other guides on r/modguide as well. :)
Automoderator can do a lot of things. I'm always keeping an eye out for lesser known rules that can make tasks easier.
Here's a rule for helping users set flair. The first time they comment in the sub AM will message them and ask them to set flair or modmail you. You can easily set a flair using toolbox which is the subject of a post I just made here.
--- # 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%2FSUBREDDIT). ---
Thanks for your contribution! I'll add it to the post tonight as I'm on mobile.
I have a few more snippets. Perhaps if I make a wiki page to collect them all? If they're not on AM's snippet list already. That way we can add to it even after the post is archived.
More from MG:
-
More snippets here in the wiki.
Useful - https://regex101.com/ https://www3.ntu.edu.sg/home/ehchua/programming/howto/Regexe.html
I found a few more snippets that could be helpful and have them linked here.
This is a very nice tutorial for AutoModerator.
Thank you for compiling it, u/SuddenMap.
I will definitely benefit from it, along with random rules users provide in other subreddits, such as r/modhelp. Having all sorts of tutorials in one place (i.e. r/modguide) is a lot easier, though. Needless to say I will keep an eye on what's posted here. :)
Thank you!
do I need to add u/automoderator as a mod for all of this to work ?
Nope! u/AutoModerator is not needed as a mod on your subreddit unless you are configuring scheduled posts (details here!).