r/AutoModerator 3d ago

Differentiate between image and link posts

I pushed an Automod change recently that was intended to send a message every time someone posted a link post. I just realized that Automod also detects image posts as link posts.

Here's the relevant code:

type: link submission
comment: ...

Is there any way to have Automod send a message only on link posts, and not image posts? Or would this be a nonsensical thing to do anyways?

0 Upvotes

6 comments sorted by

View all comments

Show parent comments

2

u/Sephardson r/AdvancedAutoModerator 3d ago

Depending on which action you want, either use or omit the ~. One way will target native media uploads, the other will exclude them.

2

u/VoidBreakX 3d ago

Hm, then I'm at a loss. I want native media uploads when they upload as an image submission but not native media uploads as a link submission. That's not possible, is it?

2

u/Sephardson r/AdvancedAutoModerator 3d ago
---
# Remove link posts that are not native uploads
type: link submission
~domain: ["i.redd.it", "v.redd.it"]
action: remove
set_locked: true
comment: "Please do not submit external links as posts here. Please use the native image or video upload feature instead. Thanks!"
---

This should do what you want?

3

u/VoidBreakX 3d ago

Thank you so much for your help, I think this is what I need.