Skip to content

Error handling

Tommaso Ornato edited this page Sep 7, 2023 · 11 revisions

The AutoMod has several built in error handlers with custom error messages to simplify the troubleshooting process.

All of the following messages are possible answers that a moderator might receive after having attempted to add a new AutoMod rule, by sending a message to the bot.

Error messages

Incorrect schema

The schema of one or more of the submitted configurations doesn't match any of the expected JSON schemas. This is likely caused by an error on your end while configuring the AutoMod. Make sure to double check the rule you are trying to write, compare it to the many examples presented in this wiki and the expected JSON schema found within this repository.

To help you fix this error you can also add a $schema proprety to your rule and use either Visual Studio Code or the online editor to validate it. Add one of the following lines to your rule, in accordance with the rule field you are trying to set:

Comment:

{
    "$schema": "https://raw.githubusercontent.com/ornato-t/lemmy-automoderator/master/src/schemas/comment.json",
    "rule": "comment",
    [...]
}

Post:

{
    "$schema": "https://raw.githubusercontent.com/ornato-t/lemmy-automoderator/master/src/schemas/post.json",
    "rule": "post",
    [...]
}

Exception:

{
    "$schema": "https://raw.githubusercontent.com/ornato-t/lemmy-automoderator/master/src/schemas/exception.json",
    "rule": "exception",
    [...]
}

Mention:

{
    "$schema": "https://raw.githubusercontent.com/ornato-t/lemmy-automoderator/master/src/schemas/mention.json",
    "rule": "mention",
    [...]
}

Community not found

The community for which you are trying to add a rule doesn't exist on the local instance. This might be either because it does exist but it's hosted on a different instance or because you are writing its name incorrectly.

The "community" field should be filled with the name of a community, not its displayed_name. In other words, for the community displayed in this picture you should write "lemmy_support", not "Lemmy Support".

immagine

You are not a moderator

Only moderators may specify AutoMod rules.

AutoMod is not a moderator

Error while processing AutoMod configuration

Error handling with multiple rules

Clone this wiki locally