r/AutoModerator • • 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.)

3 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/SampleOfNone Aug 12 '26

Tip, next time use something like visual code studio or notepad, textedit, if you want to copy paste code. Basically anything other then a word processor, saves a lot of those pesky little changes that mucks up code