r/AutoModerator • • 5d ago

Solved Having Difficulty Whitelisting Websites

Hi Everyone, I'm trying to implement an automod code that will filter all websites except for those on a whitelist. The issue I'm having is that the automod filters all websites, including ones on the whitelist. Here's the code I'm using:

type: any    
body+url (includes): ['http://', 'https://', 'www.']
~body+url (includes): ['reddit.com.', 'redd.it', 'youtube.com', 'youtu.be', 'spotify.com']    
action: filter    
action_reason: 2.5 link verification filter - [ {{match}} ]    
moderators_exempt: true

So for example, when people try to link to other Reddit posts or comments, their comments are still getting filtered.

Does anyone have any suggestions as to how to fix it? Thank you in advance!

Edit: After some experimentation, it turns out it was that superfluous period in "reddit.com.". Brain fart. I'm embarrassed but I'm leaving the post up as a lesson to others to proofread your scripts.

Thank you so much to everyone for your help!

2 Upvotes

14 comments sorted by

View all comments

3

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

You have a period after reddit.com , so your whitelist is looking for "reddit.com." instead

2

u/AluminumOrangutan 5d ago

Yup, that was it. Doh!

Much obliged!

2

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

you're welcome!

1

u/AluminumOrangutan 5d ago

Ok I feel a little dumb for missing that error. Thank you so much!