AutoModerator Ban Extension is a Devvit app that bans users on behalf of AutoModerator or other apps/bots.
To ban a user via Automoderator, simply write a command like "!ban user 10 "reason"" in a comment block in the AutoModerator config. You can also include the command in the action_reason field of AutoModerator removal/spam rules if you do not wish to leave a comment.
The "!ban user" command can be in any case and the space is optional. !ban works too. The "10" in the above example is the number of days to ban for. You can also use the word "permanent" (case-insensitive) for a permanent ban (0 for permanent also works).
The "reason" is the link to your custom message (case-sensitive).
You can append " remove" to have u/autoban-ext remove the comment AutoModerator just made. It can still be seen in the user's notifications but not by anyone else.
The Ban Message Format uses the Named Block Text Format (defined below). Each block is one message, and its name identifies it when the reason is used.
The Named Block Text Format consists of Blocks.
- Each Block is seperated by "
---" on a line of its own. - Optional
name: line defines the block’s key. Only the text aftername: is used as the key.- While optional, if you do not put a "
name:", its name will be the empty string, which is rarely what you want.
- While optional, if you do not put a "
- Everything after that until the end of the block is the value. Any text is allowed in the value, except a line consisting solely of --- (used to start a new block).
name: documentation
# Named Block Text Format
the Named Block Text Format consists of Blocks.
- each Block is seperated by "`---`" on a line of its own.
- Optional `name`: line defines the block’s key. Only the text after `name`: is used as the key.
- while optional, if you do not put a "`name: `" its name will be the empty string, which is rarely what you want.
- everything after that until the end of the block is the value. Any text is allowed in the value, except a line consisting solely of --- (used to start a new block)..
---
name: edge case
these quotes are part of the resulting string.
---
this block's name is "" in javascript.
---
name: warning
please be careful if your text starts with `name: `, you should always use a name explicitly
---
name: edge case 2
name: edgy Text
note that trying to use 2 names doesnt work.
Only the first name: line in a block is treated as the key. Any subsequent name: lines are part of the value.”
Of course, u/AutoModerator may not be the only moderator bot in your subreddit. To have any other person or bot be able to use the command described above, simply write their username in the subreddit config on the developers.reddit.com site.
see on github (https://github.com/DNSCond/autoban-ext/blob/main/example-configs.md)
https://developers.reddit.com/apps/autoban-ext/, https://github.com/DNSCond/autoban-ext.
for the command in modmail and to mute.
https://developers.reddit.com/apps/custommute/, https://github.com/DNSCond/custommute.
by using both these apps you can ban and mute at the same time.