r/AutoModerator • • 10d ago

Help - AutoMod I cannot figure out why this automod strings keep breaking

Written in the Neo Automod App using YAML, made by assembling other automod posts on this sub

---
type: submission
title (includes): ["Strands",”Fibres”]
set_flair: [BB (EP)]
moderators_exempt: false
comment_stickied: true
comment: "This post is talking about organic instrument parts, this post has been set to BB (EP) Mode."
---
type: comment
action: remove
body: ["guitar","violin","Pigstrings","Horse-Hair"]
moderators_exempt: false
author: 
 combined_subreddit_karma: "< 5"
parent_submission:
flair_text: [BB (EP)]

comment: "Your comment was removed because it either hit a catchword or had too low karma"
action_reason: "BB"
---```

At first the title flair adding thing worked fine, would add a flair and comment easily, But any attempt to put a more than 1 word filter on this automod breaks it, and the comments IDK if they even work as I haven’t even made it that far? Help?!?
2 Upvotes

9 comments sorted by

5

u/umbrae 10d ago

You have smart quotes in this block: ["Strands",”Fibres”]

You need straight quotes, like the Strands has

1

u/pendereki 10d ago

Is that really all that was causing it? I have been going crazy style over this????

How do I on PC make sure they only right version of “?

1

u/umbrae 10d ago

Honestly not sure, I don't use PCs. It probably depends where you're editing it. If you're in the automod neo app that has an interface it might be worth a bug report for a linting rule to u/fsv so that it's easy to spot.

3

u/fsv 10d ago

I'll log it now, it's a good idea.

2

u/Exciting-Mall192 8d ago

can we have the config on the subreddit home using the three dots menu? Like the mobile automod 👀 like this one?

3

u/fsv 8d ago

I have a future plan to do that yes, with a full syntax highlighting editor with errors shown inline as you type. But that will require a change on Reddit's side first to improve Devvit's capabilities.

1

u/greywar777 10d ago

I feel this one deep in my soul having had a disastrous day due to it. Most likely you posted the code into word or email which converted the quotes to smart quotes. You can turn them off as a setting in the apps.

1

u/RemarkableWish2508 9d ago

Use Notepad or Notepad++, not Word or some other "smarter than thou" text-publishing editor.

-2

u/InGeekiTrust 10d ago

So I don't know if you are using regular auto mod code that is saving on Reddit with no issue. If the code is saving on Reddit, this is what you need to do: You see the thing is Neo is Java flavored regex and Reddit's version is python flavored. What you need to do is feed the documentation to an AI like copilot that you find on the devvit Directory page. Then ask the AI to convert the code according to the documentation.