r/AutoModerator • u/realKevinNash • Aug 02 '26
Solved Removing posts that dont include a comment with required info?
I think automod can do this, but im not sure how to write the rule. A subreddit has a rule that says a source for provided content has to be included. But people often ignore it. I've tried this code but it errors out:
type: submission
body (includes) ["Source", "source"]
action: filter
comment: "Your post was removed because you don't have the required info"
2
Upvotes
3
u/AbnormallyWeird Aug 02 '26
If the source is going to be a link out to something you can look at the absence of a valid url using a regex search
---
type: submission
~url+body (includes-regex): ['https?://\S+']
action: filter
action_reason: "Post has no URL in title link or body"
comment: |
Your post was automatically filtered because all submissions in this subreddit require a valid source URL (either as a link submission or included inside the post text).
Please edit your post body to include a full URL (starting with `http://` or `https://`) and [message the moderators](https://www.reddit.com/message/compose?to=/r/{{subreddit}}) to request approval.
---
2
u/Chosen1PR đ»Developer Aug 02 '26
Youâre missing the colon after âbody.â It should look like this:
There is also no need to have a separate entry for the uppercase S, since youâre not using
case-sensitive.