Automod Make Different Comment/Action Based On Post Flair
So I'm trying to work on a way to pin posts just by commenting "!pin", idea is I will put the permalink info in the flair, have automod read it, then link to that in the comment. I'm having trouble with 1 line right now though before moving on:
"flair_text: "Sticky""
#AutoMod Pin Comment
type: comment
author:
is_moderator: true
moderators_exempt: false
body: ["!Pin"]
action: remove
action_reason: "Removed mod request and pinned comment."
parent_submission:
set_flair: ["Sticky", "Sticky", "Sticky"]
overwrite_flair: true
action: report
---
#Second Rule To Pin Comment
type: submission
reports: 1
flair_text: "Sticky"
action: approve
comment: |
The Manitoba mod team has decided to sticky [this comment]({{permalink}}) as they have felt it to be extra informative or useful to the post discussion.
The reason for sticking this comment is "{{body}}".
comment_stickied: true
comment_locked: true
So it works fine until I try to check for flair_text, if I # out that line then it approves the post and comments. I've tried
flair_text (Includes): "Sticky"
as well with no luck. The first rule is working fine right now, it sets the flair to "Sticky", but if I had that flair check it doesn't work. Any thoughts?
It needs to be able to read the flair and only action if it sees "sticky" so it doesn't try to sticky a comment on every post that is reported.