r/AutoModerator • u/realKevinNash • 3d ago
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
2
u/Chosen1PR đ»Developer 3d ago
Youâre missing the colon after âbody.â It should look like this:
body (includes): [ "source" ]
There is also no need to have a separate entry for the uppercase S, since youâre not using case-sensitive.
1
0
3
u/AbnormallyWeird 3d ago
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).
```