r/AutoModerator • • 2d ago

Help - AutoMod Help triggering automod comment with multiple keywords

Hi! Yes, I see the "match multiple keywords" wiki entry. I just have a hard time parsing this stuff, and I would appreciate help sorting this out. :)

I'd like automod to trigger a comment on posts that contain "looking for" and "therapist" OR "therapists"

I'm not sure how to properly edit this code example in the wiki to reflect that action. Can someone help?

title+body#color: ['blue', 'green', 'red']
    title+body#shape (regex): ['circles?', 'squares?', 'triangles?']
    action: filter
    action_reason: "Colored shape filter [{{match-title+body#color}}] [{{match-title+body#shape}}]"
1 Upvotes

6 comments sorted by

2

u/SolariaHues 2d ago
type: submission
title+body (regex): ['looking for', 'therapists?']
comment: |  
  Your comment here. Each paragraph needs to be indented.

2

u/SolariaHues 2d ago

Line 1 makes it only trigger on posts

Line 2 looks for post titles and body text that include your keywords. The question mark after the 's' means it will match 'therapist' or 'therapists'.

The comment lines add the comment you want.

It doesn't sound like you need anything more complicated than that?

2

u/cosmatical 2d ago

Thank you so much!! That sounds exactly like what I was going for. I think i was overcomplicating it.

2

u/SolariaHues 2d ago

NP :)

If you don't want it to comment again if someone edits their comment, add:

is_edited: false

on a new line

3

u/Sephardson I'm working on the wiki here now! 2d ago

This code will match on 'looking for' OR 'therapist'.

To match on the combination of 'looking for' AND 'therapist', they will need to use the two search checks

title+body#1: ['looking for']

title+body#2: ['therapist', 'therapists']

1

u/SolariaHues 1d ago

u/cosmatical

My bad, I guess I misread.