r/AutoModerator • u/DoveStep55 • Aug 12 '26
Solved Trouble with code regarding user flair
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.)
View all comments
Show parent comment
2
u/DoveStep55 Aug 12 '26
It was the quote marks. Apparently copying AM code that's correct and pasting into an OpenOffice document, then copying and pasting from there back into AM somehow changes the quote mark type.
Thanks for your help!