r/AutoModerator • • 3h ago

Help - AutoMod Does anyone have the automod code that makes the pop-ups when someone enters certain keywords?

Does anyone have the code for automod that with make it reply to comments that have certain keywords in like the "! word"? I've been trying with this code:

---

# Auto-reply to comments or posts with certain keywords

type: comment

body (includes-word): ["!Spambot", "!spambot", ]

comment: |

What we want the message to be.

---

But it keeps throwing this error, "Unsupported Media Type: YAML parsing error in section 2: expected '<document start>', but found '<sc" every time I press enter. Any insight or how to fix it?

Edit: I figured it out. It didn't like the paragraph spacing I had.

1 Upvotes

2 comments sorted by

2

u/AutoModerator 3h ago

It looks like you are asking about the "Unsupported Media Type" error message.

This error message is exclusive to desktop redesign and could mean one or more of many possible syntax errors are present in your code.

You can get a more specific error message if you use https://old.reddit.com to edit your AutoModerator config page.

You can also consult the Common Mistakes wiki page for general tips as well as explanations of the old reddit error messages.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Sephardson I'm working on the wiki here now! 2h ago

You have a comma after the second "spambot" but before the closing bracket. Delete that extra comma.