Skip to content

Mention

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

A Mention rule adds commands for community moderators, allowing them to quickly lock or pin a post by replying to it.

Only moderators will be able to run the commands set with this rule.

{
    "rule": "mention",
    "community": "general",
    "command": "!lock",
    "action": "lock",
    "message": "As requested, I am locking this message"
}

Sample message:

from u/Bob (moderator):

@AutoMod@lemmy.ml, please !lock this post's comment section.

Explanation:
This rule locks a post's comment section when a moderator posts a comment containing both a mention to the AutoMod, as well as the "!lock" command.

Keys

Field Name Type Description
community string Community where the rule will be active
command string Command to trigger the rule. Must be contained in the mentioning comment.
action string, either "lock" or "pin" Action that the bot should take. Either lock its comment section or pin the post to the top of the community
message string or null The message with which the bot will reply to the request. If set to null no reply will be sent

Additional Examples

Pin a post

{
    "rule": "mention",
    "community": "general",
    "command": "!pin",
    "action": "pin",
    "message": "As requested, I am pinning this message"
}

Sample message:

from u/Bob (moderator):

Hey @AutoMod@lemmy.ml, please !pin this post.

Explanation:
This rule pins (features) a post to the top of a community. Moderators like Bob will be able to pin posts by using the !pin command.

Lock a post (custom command)

{
    "rule": "mention",
    "community": "general",
    "command": "!close_comment_section",
    "action": "lock",
    "message": null
}

Sample message:

from u/Bob (moderator):

I am disabling this post's comment because you guys cannot behave. 
@AutoMod@lemmy.ml !close_comment_section

Explanation:
This rules works just like the first example but with a custom command. Moderators are free to pick the names for their commands when editing the configuration.