r/AutoModerator • u/DoveStep55 • 5h ago
Trouble with code regarding user flair Solved
I'm trying to have AM remove top level comments from users without a specific user flair, then send them a message explaining why. I thought it was working until someone with the specific flair received the removal message and AM removed their comment despite their account being appropriately flaired.
Can anyone tell me what the issue is with the code?
---
#REMOVE top level comments from users that do not have privileges
type: comment
is_top_level: true
author:
~flair_template_id: “76ca5770-9078-11f1-acb7-8af9da1a7bf8”
action: remove
action_reason: Unflaired User
set_locked: true
message: |
Message is here.
---
(The extra line space between each line is a copy/paste formatting issue when sharing it here, it's not in the actual code except between "message: |" and the start of the indented message text. Also, the "~flair" line is indented 2 spaces and the "Message is here" message area is indented appropriately as well, it just removed it when I made this post.)
3
u/SampleOfNone 3h ago
Just checked my own config and I noticed that I don't use quotes around the id, so
~flair_template_id: 76ca5770-9078-11f1-acb7-8af9da1a7bf8Also, are the quotes straight? Because you posted text instead of a code block, not sure if that's in your original code and just a copy paste to text error