Advanced Automod/Configuration

Configuration

Every option in advancedmod.json5.

Advanced Automod has two files in AthenaBot's configuration/ folder:

FileWhat it holds
advancedmod.json5License, ignored channels and roles, rules and the honeypot.
advancedmod-lang.json5The messages rules send to members.

Restart AthenaBot after editing either file.

configuration/advancedmod.json5
{
  config: {
    LICENSE_KEY: "",
    ignored: {
      categories: [],
      roles: [],
      channels: [],
      users: [],
    },
    rules: {
      excessive_emojis: { ... },
      excessive_pings: { ... },
      blacklisted_words: { ... },
    },
    settings: {
      honeypot_mute_hours: 168,
    },
  },
}
OptionWhat it does
LICENSE_KEYYour Advanced Automod license key.
ignored.categoriesCategory IDs whose channels are never checked.
ignored.channelsChannel IDs that are never checked.
ignored.rolesRole IDs whose members are never checked.
ignored.usersUser IDs that are never checked.
rulesYour rules. See below.
settings.honeypot_mute_hoursHow long the honeypot mutes someone, in hours. null mutes until a moderator unmutes them.

Members on the moderation plugin's whitelist are also skipped. Bots are always skipped.

Rules

Each key under rules is one rule. The key is just a name for you.

excessive_emojis: {
  name: "Excessive Emojis",
  description: "Too many emojis in one message.",
  enabled: true,
  management: {
    type: "emoji",
    action: [
      { type: "delete" },
      { type: "mute", duration: "1m" },
    ],
    guide: {
      emoji_limit: 5,
      ignored_emojis: [],
    },
  },
  response: {
    type: "DM",
    message: { id: "excessive_emojis" },
  },
},
OptionWhat it does
nameShown in moderation logs as the reason, unless an action sets its own.
descriptionA note for you. Not shown anywhere.
enabledfalse turns the rule off.
management.typeWhat the rule checks: emoji, ping or message.
management.actionWhat happens when it triggers, in order.
management.guideThe rule's limits. Depends on the type.
responseOptional. A message sent to the member.

Guide by Type

TypeOptionWhat it does
emojiemoji_limitTriggers when a message has more emojis than this. Counts both Unicode and custom emojis.
ignored_emojisEmojis that are not counted, such as "๐Ÿ‘" or "<:pepe:123456789012345678>".
pingping_limitTriggers when a member pings more users and roles than this within the window.
window_msThe window in milliseconds. Defaults to 30000.
ignored_pingsUser or role IDs that are not counted.
messagemessagesWords or phrases. Matches anywhere in the message, ignoring case.
regexA regular expression, tested ignoring case. Leave "" to skip.

Actions

TypeOptionsWhat it does
deleteDeletes the message.
warnreasonGives a warning through the moderation plugin.
muteduration, reasonTimes the member out. duration such as "10m", "1h" or "7d". null is permanent.
kickreasonKicks the member.
banduration, reasonBans the member. null is permanent.

Warns, mutes, kicks and bans go through the moderation plugin, so they show up in its logs and history like any other punishment.

Responses

OptionWhat it does
typeDM sends it privately. REPLY replies in the channel.
message.idA response under responses in advancedmod-lang.json5.
message.buttonsOptional. A button that swaps the message for another one.

A button has a name, a style (BLUE, GRAY, GREEN or RED) and its own message with an id. Inside that message, a button with backbutton: true goes back to the first message. See Responses.

advancedmod-lang.json5

Each entry under responses is a message in AthenaBot's components format. Buttons from the rule are added to the bottom of the message.

configuration/advancedmod-lang.json5
{
  lang: {
    responses: {
      excessive_emojis: {
        components: [
          {
            type: "container",
            accentColor: "#FFA500",
            components: [
              { type: "text", content: "# Message Removed\n\nYour message in %channel% had too many emojis." },
            ],
          },
        ],
      },
    },
  },
}
PlaceholderValue
%user_mention%The member, as a mention.
%user_id%The member's ID.
%username%The member's username.
%rule%The rule's name.
%server%Your server's name.
%channel%The channel the message was sent in.
%primary_color%Your AthenaBot accent colour.
%custom_emoji_<id>%Any AthenaBot emoji.

The plugin ships responses for every default rule: excessive_emojis, excessive_emojis_details, excessive_pings and blacklisted_words.