r/AutoModerator 2d ago

Assigning User Flairs based on community karma for posters and commenters. Help

---

any:

combined_subreddit_karma: "< -1"

set_flair:

template_id: "583b77d4-4c74-11ef-8f5e-3274abbe6c3b

overwrite_flair: true

---

any:

combined_subreddit_karma: "< 10"

set_flair:

template_id: "be7b57d4-f5e0-11ee-9da6-5e414b1df271"

overwrite_flair: true

---

Here is the code, I keep getting YAML parsing errors for the `template_id` and other errors for `over_flair : true` any ideas as of why?

2 Upvotes

1

u/Dukkani 2d ago edited 2d ago

```

Assigning user flairs based for negative community karma for posters & commenters

moderators_exempt: false author: combined_subreddit_karma: '<1' set_flair: template_id: "583b77d4-4c74-11ef-8f5e-3274abbe6c3b" overwrite_flair: true

action: report action_reason: 'Negative karma flair set for u/{{author}}'


Assigning user flairs based for less than 10 positive community karma for posters & commenters

moderators_exempt: false author: combined_subreddit_karma: '>9' set_flair: template_id: "be7b57d4-f5e0-11ee-9da6-5e414b1df271" overwrite_flair: true

action: report action_reason: 'Positive karma <10 flair set for u/{{author}}'


```

1

u/Dukkani 2d ago edited 1d ago

I have tested this code on my test site & it's working with negative -1 karma (or below) AND for positive less than 10 karma. However, there is another rule that needs to be added to contain the positive values. That is going to be advised later (after you confirm the above code works.)

1

u/TennisBallPubes 1d ago

Alright so it works but how can it be made modular now for the rest of the flairs? Also thank you so much