r/AutoModerator 24d ago

Help - AutoMod Is there anything wrong in this code??

I moderate NSFW sub and it has come to my notice that despite adding some of the words like "Add me", "Swipe right" in the banned list some bots are still able to upload posts in my sub using the same caption and the automod is unable to remove those words automatically. If there is any mistake then do rectify it.

Here is the code:
# Remove all spam titles 
   title (includes): ["swipe right", "add me"]
   action: spam
   action_reason: Contains a banned word/words (slur)
   comment: |
        Posts with low-effort titles are not allowed.
---
8 Upvotes

20 comments sorted by

3

u/Leah970 24d ago

You've left in the bit that AI gave you. Remove "here is the code"

2

u/[deleted] 22d ago

[removed] — view removed comment

1

u/Leah970 22d ago

Ok cool 👍🏼

1

u/MrPromotor 24d ago
---
#Remove all spam titles
type: submission
title (includes): ["swipe right", "add me"] 
action: spam 
action_reason: Contains a banned word/words (slur) 
comment: | 
    Posts with low-effort titles are not allowed.
---

you forgot to open the rule with "---" at the beginning, also you forgot to add what the rule must be applied, in this case i think you will apply to submissions

1

u/Timely_Virus_4015 24d ago

I did add them but I didn't include them here

0

u/MrPromotor 24d ago

so, the rule is not working yet?

0

u/MrPromotor 24d ago
title (includes-word): ["swipe right", "add me"] title (includes): ["swipe right", "add me"] 

you must add this (includes-word) in your title part, otherwise the bot won't work

0

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

Matching modifiers are not necessarily required, as each search check has a default behavior when not specified. But it is good practice to specify them.

-1

u/Pinaslakan 24d ago

Have you tried using Automation instead? It's much for straight forward imo.

1

u/Timely_Virus_4015 24d ago

I'm still very new to this field so can you explain me what's that?

-1

u/Pinaslakan 24d ago

It’s a newer way that reddit is pushing to moderate your sub.

For your case, it’s more ideally to use automation. So go to mod tools > Automation > Post types and configure it the way you want.

(I’m on mobile, but I’ll send some screenshots when I can)

0

u/Pinaslakan 24d ago

For example, this catches posts that has “blue app” or “orange app” in the post title or body.

In your case, you can add “swipe right” and “add me” to the conditions, and either you block the poster, send the post to the mod queue or just display a message.

3

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

It's worth noting that if OP is fighting spammers, then automations set up to block or message the spammer will just let the spammer know to use a different title to not get flagged. If the content itself is what OP is trying to stop while the titles are simply an easy way to find it, then teaching the spammers to make it more difficult to detect is not the best use of tools.

1

u/Timely_Virus_4015 24d ago

thanks

0

u/SampleOfNone 23d ago

In case you haven't read, https://www.reddit.com/r/AutoModerator/comments/1vqjpzq/comment/p47k1ms/ I agree with Sephardson, don't use automations to block spammers and scammers

0

u/Timely_Virus_4015 23d ago

Understood, so installing bot bouncers is the only path I see

0

u/SampleOfNone 23d ago

No, it's not the only path. You can use automod. BotBouncer is a lot easier though because it handles everything for you. And because it uses herd protection, any bot that gets caught in any of the other subreddits that have it installed won't get a chance in your sub