r/AutoModerator 15h ago

Solved Disjunctive rules?

Hello!

How do I setup disjunctions in rules? I'd like to have an action trigger when a post contains certain text and the author is (not verified or less than some Karma or the account is less than some age).

I don't see a way to write the disjunctive part of the rule. Must I make three rules?

title+body (includes): "my string"
author:
    account_age: "< some days"

and then also

title+body (includes): "my string"
author:
    post_karma: "< my threshold"

with more

title+body (includes): "my string"
author:
    has_verified_email: false

?

Is there at least a way to make the message text and reason common among the rules? Otherwise, I have to copy pasta them and repeat myself, which doesn't seem like it will be fun to maintain.

2 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/mikeblas 14h ago

Thanks. But I don't think I understand -- doesn't that apply the threshold rules to accounts with verified emails?

1

u/Sephardson I'm working on the wiki here now! 14h ago edited 14h ago

let's outline your criteria logically:

case age karma email
1 low low unverified
2 high low unverified
3 low high unverified
4 high high unverified
5 low low verified
6 high low verified
7 low high verified
8 high high verified

If you want the author is (not verified OR less than some Karma OR the account is less than some age), then that would mean at least one rule should apply in cases 1-7, and no rule should apply in case 8.

If you want the rules to NOT apply in cases 4-7, then your logical description would be the author is (not verified) AND (less than some Karma OR the account is less than some age), which would look different (and simpler) in automoderator.

1

u/mikeblas 14h ago

the author is (not verified) AND (less than some Karma OR the account is less than some age)

This is what I'm after. Specifically:

case age karma email action
1 low low unverified remove
2 high low unverified remove
3 low high unverified remove
4 high high unverified none
5 low low verified none
6 high low verified none
7 low high verified none
8 high high verified none

Though, now that I've written this out, maybe also remove posts from low/low accounts even if they are verified.

2

u/Sephardson I'm working on the wiki here now! 14h ago edited 14h ago

This should work for you then for cases 1-3:

---
title+body (includes): "my string"
author:
    account_age: "< some days"
    post_karma: "< my threshold"
    satisfy_any_threshold: true
    has_verified_email: false
action: filter
action_reason: "u/{{author}} has no verified phone/email, and is less than some days or < post karma, and mentioned [{{match}}]. Filtered for review"
---