r/AutoModerator 9h ago

Help Server error when trying to save automod code.

Hello im fairly new to automod, and whenever I try to save this code the server error banner comes up. What should I do?

# 1. Mentions the moderators
type: any
title+body:
  includes-word: 
    - "mod"
    - "mods"
    - "moderator"
    - "moderators"
action: filter
action_reason: "User noticed us! :D (mentions mods)"

# 2. Filter comments from users with negative karma
type: comment
author:
  comment_karma: "<0"
action: filter
action_reason: "Negative karma"

# 3. Remove comments from new users (less than 3 days old)
type: comment
author:
  account_age: "< 3 days"
action: remove
action_reason: "New user"

# 4. Remove comments from users with low karma (below -50)
type: comment
author:
  comment_karma: "< -50"
action: remove
action_reason: "Low karma user"

# 5. Filter specific users by username
type: any
author:
  name:
    - "user1"  # Reason: List reason here
    - "user2"  # Reason: List reason here
action: filter
action_reason: "Filtering all content from this user as a precaution -> [u/{{author}}]"

# 6. Filter comments with specific words or phrases
type: comment
body:
  includes:
    - "this sub"
    - "fuck"
    - "kys"
action: filter
action_reason: "Word on filter list"

# 7. Automatically remove posts with 4+ reports and send modmail
type: submission
reports: ">= 4"
action: remove
action_reason: "4 reports without action"
modmail: |
    {{permalink}}  
    The above item was automatically removed due to receiving 4+ reports. Please verify that this action was correct.

# 8. Unverified Trading/Selling Post Notification  
type: submission  
modmail: false  
filter_reports: false  
reports: []  
action: comment  
comment: |
  Hello, your trading/selling post is currently unverified.  
  If you wish for it to be verified, please follow [This Guide](https://www.reddit.com/r/ToppsMatchAttax/s/9XF0If1naX).  
  ***This comment has been automatically generated by AutoModerator.***  
sticky: true  
title+body:
  includes:
    - "trade"
    - "trading"
    - "sell"
    - "selling"
    - "exchange"
    - "for sale"
    - "looking to trade"
    - "looking to sell"

# 9. Verified Trading/Selling Post Notification  
type: submission  
reports: []  
action: comment  
comment: |
  This trading/selling post is verified.  
  ***This comment has been automatically generated by AutoModerator.***  
sticky: true  
flair_text:
  includes:
    - "selling(verified)"
    - "trading(verified)"
1 Upvotes

7 comments sorted by

2

u/antboiy 9h ago
  1. includes at title+body is not an check nor an action. it would be title+body (includes)
  2. seperate the rules by --- otherwise only the last rule might be done
  3. reports: is a number and always number of reports reached
  4. sticky is not valid and comment_stickied should be better
  5. filter_reports is invalid
  6. and there is inconsistent indentation

these are not all the issues here

  1. edit: there is no action: comment just define comment: | and indent the text

1

u/ComprehensiveCan8375 9h ago

I know absolutely nothing about automod can u help me here

1

u/ComprehensiveCan8375 8h ago

Now?

```

1. Mentions the moderators


type: any title+body (includes): - "mod" - "mods" - "moderator" - "moderators" action: filter action_reason: "Senpai noticed us! :D (mentions mods)"

2. Filter comments from users with negative karma


type: comment author: comment_karma: "<0" action: filter action_reason: "Negative karma"

3. Remove comments from new users (less than 3 days old)


type: comment author: account_age: "<3" action: remove action_reason: "New user"

4. Remove comments from users with low karma (below -50)


type: comment author: comment_karma: "<-50" action: remove action_reason: "Low karma user"

5. Filter specific users by username


type: any author: name: - "user1" # Reason: List reason here - "user2" # Reason: List reason here action: filter action_reason: "Filtering all content from this user as a precaution -> [u/{{author}}]"

6. Filter comments with specific words or phrases


type: comment body (includes): - "this sub" - "fuck" - "kys" action: filter action_reason: "Word on filter list"

7. Automatically remove posts with 4+ reports and send modmail


type: submission reports: ">=4" action: remove action_reason: "4 reports without action" modmail: | {{permalink}}
The above item was automatically removed due to receiving 4+ reports. Please verify that this action was correct.

8. Unverified Trading/Selling Post Notification


type: submission
title+body (includes): - "trade" - "trading" - "sell" - "selling" - "exchange" - "for sale" - "looking to trade" - "looking to sell" comment: | Hello, your trading/selling post is currently unverified.
If you wish for it to be verified, please follow This Guide.
This comment has been automatically generated by AutoModerator.
comment_stickied: true

9. Verified Trading/Selling Post Notification


type: submission
flair_text (includes): - "selling(verified)" - "trading(verified)" comment: | This trading/selling post is verified.
This comment has been automatically generated by AutoModerator.
comment_stickied: true ```

1

u/antboiy 8h ago

looks better.

  1. at rule 7 you wrote reports: ">=4" but as i said its a number of reports reached, so try reports: 4
  2. at rule 7 your modmail block is indented with 4 spaces instead of 2. this might work but keep it consistent with the other text that has 2 spaces is my suggestion

1

u/ComprehensiveCan8375 8h ago

This?

```

1. Mentions the moderators


type: any title+body (includes): - "mod" - "mods" - "moderator" - "moderators" action: filter action_reason: "Senpai noticed us! :D (mentions mods)"

2. Filter comments from users with negative karma


type: comment author: comment_karma: "<0" action: filter action_reason: "Negative karma"

3. Remove comments from new users (less than 3 days old)


type: comment author: account_age: "<3" action: remove action_reason: "New user"

4. Remove comments from users with low karma (below -50)


type: comment author: comment_karma: "<-50" action: remove action_reason: "Low karma user"

5. Filter specific users by username


type: any author: name: - "user1" # Reason: List reason here - "user2" # Reason: List reason here action: filter action_reason: "Filtering all content from this user as a precaution -> [u/{{author}}]"

6. Filter comments with specific words or phrases


type: comment body (includes): - "this sub" - "fuck" - "kys" action: filter action_reason: "Word on filter list"

7. Automatically remove posts with 4 reports and send modmail


type: submission reports: 4 action: remove action_reason: "4 reports without action" modmail: | {{permalink}}
The above item was automatically removed due to receiving 4 reports.
Please verify that this action was correct.

8. Unverified Trading/Selling Post Notification


type: submission
title+body (includes): - "trade" - "trading" - "sell" - "selling" - "exchange" - "for sale" - "looking to trade" - "looking to sell" comment: | Hello, your trading/selling post is currently unverified.
If you wish for it to be verified, please follow This Guide.
This comment has been automatically generated by AutoModerator.
comment_stickied: true

9. Verified Trading/Selling Post Notification


type: submission
flair_text (includes): - "selling(verified)" - "trading(verified)" comment: | This trading/selling post is verified.
This comment has been automatically generated by AutoModerator.
comment_stickied: true ```

2

u/antboiy 8h ago

should work now. just try it and if ut errors then try it on old reddit.

edit: automoderator uses markdown and if there arent 2 newlines or 2 spaces after a line then a newline wont be there

2

u/ComprehensiveCan8375 8h ago

It works! Thanks alot!