r/AutoModerator • u/Deimorz [Δ] • Jul 09 '14
Update New AutoModerator capabilities: checking if commenter is submitter, setting NSFW/sticky/contest-mode NSFW
I've added a couple more commonly-requested features to AutoModerator today:
Ability to check if a commenter is the submitter
This check is done with author_is_submitter and allows you to set up comment rules that behave differently for the submitter of a post than for other users. If set to true, the condition will only match if the commenter is the submitter, and if set to false it will only match if the commenter is NOT the submitter.
Examples:
Remove all comments posted by users with less than 10 combined karma, unless they're commenting in their own submission:
type: comment
user_conditions:
combined_karma: "< 10"
author_is_submitter: false
action: removeSend an alert to modmail if the OP comments with "solved" or "thanks":
type: comment
body: ["solved", "thanks"]
author_is_submitter: true
modmail: Please check the above thread, the author seems to have indicated that it's been solved.Ability to set NSFW/sticky/contest-mode
All three of these possible actions are defined with a new set_options directive, which can take either a single one of the choices, or a list (enclosed in square brackets) if you want to set multiple on anything that matches. The valid choices are nsfw, sticky, and contest.
Examples:
Sticky and contest-mode anything submitted by HypotheticalContestBot:
type: submission
user: HypotheticalContestBot
set_options: [sticky, contest]Set NSFW on anything with "spoiler" or "spoilers" in the title:
title: [spoiler, spoilers]
set_options: nsfwThe open-source code and documentation has been updated with these as well.
2
Jul 09 '14
Ability to check if a commenter is the submitter
Literally just asked for this. Thanks!
1
u/aladyjewel +1 Jul 09 '14
and i literally just told somebody in /r/enhancement to ask the mods if they could automatically turn contest mode on his posts =D
1
Jul 09 '14
So this is just to make all of one persons posts contest mode and not give the poster the ability to toggle contest mode for a single post?
1
u/aladyjewel +1 Jul 09 '14
Right. This is just an extension of moderator abilities, with automation so the mods don't have to go click the button on their own.
1
Jul 10 '14
After looking at it this won't work. There are many individual users over on /r/electronic_cigarette that run their own contests, but not all of their submissions are contests. When I search on here for reddit raffle there are people in other subs looking for a better and less tedious substitute for reddit raffle besides copying and pasting every top level commenter into random.org. Thanks for the help though
2
u/aladyjewel +1 Jul 10 '14 edited Jul 10 '14
You can set up AutoMod to trigger on title / text as well as username.
type: submission title: contest user: [ dnabox, andytuba, contestguy ] # optional, whitelist users who may run contests set_options: contest
I could also write up a small bookmarklet to select a random top-level comment when I'm near a computer.Here is a bookmarklet for selecting a random top comment from the visible comments.
javascript:(function() { var topLevelComments = document.querySelectorAll(".commentarea > .sitetable > .thing.comment"); var selectedComment = topLevelComments[Math.floor(Math.random() * topLevelComments.length)]; var permalink = selectedComment.querySelector('.bylink'); document.location.href = permalink.href; })();
Create a new bookmark named "reddit raffle winner" and copy-paste ^ this snippet into it:
Go to your contest post's comments. This works best if you append
?depth=1to the URL, so you only get top comments (and therefore get more of them at once), like so: http://www.reddit.com/r/AutoModerator/comments/2a9fi6/new_automoderator_capabilities_checking_if/?depth=1Click "load more comments" at the bottom of the page until all the top-level comments are loaded.
Click your bookmarklet to run it on the current page.
The bookmarklet will send you to the "winning" comment, randomly selected from the visible top-level comments.
1
u/godmin Jul 09 '14
Awesome! This will be incredibly useful in the sub I mod. Now we don't have to manually sticky and contest the discussion threads we have each week.
1
1
1
1
u/IAmAN00bie Jul 11 '14 edited Jul 11 '14
I'm sure you've gotten this before, but you're the best admin dude. Thanks so much.
edit: can we flair submissions based on if OP makes a comment?
2
u/roastedbagel +2 Jul 10 '14 edited Jul 10 '14
/r/tipofmytongue and /r/whatisthisthing thank you!
Will we be able to set flair on the post of the comment it matches with this using the flair conditions?