Skip to main content

Impersonator Alerts

Alert moderators when a member's username or display name matches a pattern that imitates someone your members trust.

Why Use This Feature?

  1. Catches lookalike names with patterns you write, such as one pattern for both "moderator" and "m0derator", so moderators hear about them before members are fooled.
  2. Strips accents before matching, so an accented copy of a staff name matches the same pattern as the original.
  3. Re-checks names when members change their server nickname or username, so an account that switches to a staff name later is still flagged.
  4. Exempts the real account per rule, so the person you protect never triggers their own alert.
  5. Stays observation-only, so a false match never removes anyone.

How It Works

  • When it checks — On join, the bot checks the username and then the display name. It checks again when a member's server nickname or username changes, for members it has seen since its last reconnect.
  • How names are compared — Names have their accents removed, styled and fullwidth letters turned into plain ones, and letters lowercased before matching, while punctuation and spaces stay.
  • Which rule fires — The first name that matches any rule wins, and for that name the first matching rule is used, so each event produces at most one alert.
  • What it posts — One plain-text alert with your message, then the rule name, the member, and the name that matched.
  • Who is skipped — Bots, system accounts, and each rule's trusted account.

Because names are lowercased first, it is recommended to write patterns in lowercase. A pattern that contains capital letters matches only when you add the i flag.

These alerts post only in your Discord alert channel, while Notifications sends alerts about the bot itself to your phone or inbox.

Requirements

Settings

FieldDescription
Alert destination → Channel (channel)The alert channel, required.
Protected identities (entities)1 to 100 rules.
Name (entities[].name)The rule's name, shown in each alert, up to 100 characters.
Regular expression (entities[].regex)The Pattern, up to 512 characters, and optional Flags, up to 16 characters.
Message → Text (entities[].payload.content)Optional alert text of up to 2,000 characters.
Trusted member (entities[].user.user-id)Optional Discord ID, typed in, of the account this rule skips.

Without a message, the alert starts with "A potential impersonator was detected: %MEMBER_USER_MENTION%."

Example

Impersonator alerts settings
json
{
  "channel": { "channel-id": "123456789012345678" },
  "entities": [
    {
      "name": "Server owner",
      "regex": { "pattern": "j[a4]ck[yi]" },
      "user": { "user-id": "323456789012345678" }
    }
  ]
}

Message Variables

VariableBecomes
%MEMBER_USER_MENTION%A mention of the member

Only %MEMBER_USER_MENTION% is replaced, and any other variable the form offers posts as written.

Limits

  • Rules — Up to 100.
  • Alert length — The whole alert is cut at 2,000 characters.

Troubleshooting

  • A pattern never matches — Check it for capital letters, because names are lowercased before matching.
  • A name change wasn't flagged — The bot sees changes only for members it has seen since its last reconnect. Username, server nickname, and global display-name changes all trigger a new check.
  • "Configured impersonator-alert channel is unavailable." — This log entry means the alert channel is a category, forum, or other channel that can't hold messages. A deleted channel logs "Unknown Channel" instead, and a channel the bot can't see logs "Missing Access".

Changes from the legacy bot

The legacy bot checked usernames on join and on username changes, and nicknames on update, kept letter case, and posted one alert for every matching rule. The rewrite checks usernames and display names, lowercases them, and posts one alert per event.