ZMN Bot logo

    ZMN Bot Documentation

    Setup guides and configuration reference for every ZMN module — security, moderation, roles, leveling, and access control.

    Quick Navigation

    Basics
    Modules

    Moderation

    Complete moderation system with commands, auto-mod, case management, and auto-revert

    Overview

    The Moderation module provides a comprehensive toolkit for server moderation. It combines slash commands for manual moderation, an auto-mod engine for automated message filtering, a case management system for tracking all actions, and an auto-revert scheduler for temporary punishments.

    What's Included

    • • 19 Moderation Commands — ban, kick, mute, timeout, warn, and more
    • • 9 Auto-Mod Detectors — bad words, spam, invites, caps, links, crypto scams and more
    • • Case Management — numbered cases for punishments, auto-mod hits and security actions
    • • Auto-Revert Scheduler — temporary bans, mutes, locks automatically revert
    • • Escalation System — automatic punishment escalation based on warn count
    • • DM on Action — tells members why they were punished (premium)

    Moderation Commands

    Every moderation command checks who is running it. The server owner can always use an enabled command. Anyone else needs the command's Allowed Users or Allowed Roles, an Admin Role, a Moderator Role (not enough for /ban or /unban), or the matching Discord permission. Disabled Roles block a command even for Admin Roles.

    User Punishment

    /banSlash Command

    Ban a user from the server

    Usage: /ban <user> [reason] [delete_days]
    delete_days (0–7) erases that many days of the member's messages; without it the Delete Message History setting is used. A ban lifts itself only when Auto-Revert is on (premium).
    /unbanSlash Command

    Unban a previously banned user

    Usage: /unban <user_id> [reason]
    /kickSlash Command

    Kick a user from the server

    Usage: /kick <user> [reason]
    /muteSlash Command

    Mute a user (auto-creates Muted role)

    Usage: /mute <user> [reason] [duration]
    Auto-revert scheduled when duration is provided
    /unmuteSlash Command

    Remove mute from a user

    Usage: /unmute <user> [reason]
    /timeoutSlash Command

    Discord native timeout (max 28 days)

    Usage: /timeout <user> [reason] [duration]
    Discord native timeout (max 28 days)
    /untimeoutSlash Command

    Remove timeout from a user

    Usage: /untimeout <user> [reason]
    /warnSlash Command

    Issue a warning (triggers escalation check)

    Usage: /warn <user> [reason]
    /unwarnSlash Command

    Lift a warning so it stops counting toward warn totals and escalation

    Usage: /unwarn <user> [reason] [case]
    Lifts the latest active warn, or the warn whose case number you give, so it stops counting toward warn totals and escalation.

    Channel Management

    /lockSlash Command

    Lock a channel preventing messages

    Usage: /lock [channel] [reason] [duration]
    Reverts when a duration is given, or when Auto-Revert is on with a Revert After. Without a duration and with Auto-Revert off, it never reverts on its own.
    /unlockSlash Command

    Unlock a previously locked channel

    Usage: /unlock [channel] [reason]
    /slowmodeSlash Command

    Set slowmode delay in a channel (premium)

    Usage: /slowmode <seconds> [channel] [duration]
    Reverts when a duration is given, or when Auto-Revert is on with a Revert After. Without a duration and with Auto-Revert off, it never reverts on its own.
    /clearSlash Command

    Bulk delete recent messages in this channel

    Usage: /clear <amount> [user]
    Scans the most recent messages in the current channel. Messages older than 14 days are deleted too, one at a time, so those take longer. Right-click a message and open Apps for two more: Clear till here deletes everything from the newest message back to that one, and Clear this member's messages does the same for that message's author only.

    Voice Moderation

    /vmuteSlash Command

    Mute a user in voice channels

    Usage: /vmute <user> [reason] [duration]
    Auto-revert scheduled when duration is provided
    /vunmuteSlash Command

    Remove voice mute from a user

    Usage: /vunmute <user> [reason]
    /vkickSlash Command

    Disconnect a user from their voice channel

    Usage: /vkick <user> [reason]
    /moveSlash Command

    Move a user between voice channels

    Usage: /move <user> <channel>

    User Management

    /setnickSlash Command

    Change a user's nickname

    Usage: /setnick <user> [nickname]
    Leave nickname empty to reset
    /caseSlash Command

    Look up one case, list a member's cases, or change a case's status

    Usage: /case id <id> · /case user <user> [page] · /case status <id> <status> [remark]

    Auto-Mod Engine

    The auto-mod engine checks every new or edited message from members; bots, the server owner and whitelisted members are skipped. It uses 9 configurable detectors to spot rule breaks and act on them automatically. Only the first matching detector acts on a message, to avoid double punishment.

    Bad Words

    Matches message content against a custom word list and/or the built-in default list of ~50 profanity/slur words

    useDefaultListcustomWordscaseInsensitivematchWholeWord
    Repeated Text

    Detects repeated characters, words, lines, and excessive emoji usage

    maxCharRepeatsmaxWordRepeatsmaxLineRepeatsemojiLimit
    Discord Invites

    Detects Discord invite links with options to allow own guild and specific invite codes

    allowOwnGuildallowedInviteCodes
    External Links

    Domain blocklist/allowlist with media embed options and URL shortener blocking (premium)

    modedomainsblockShortenersallowMediaEmbeds
    Excessive Caps

    Detects messages with excessive capitalization based on percentage threshold

    percentThresholdminLengthminWordCount
    Excessive Spoilers

    Detects too many spoiler tags or excessive spoiler content length

    maxSpoilersmaxSpoilerChars
    Mass Mentions

    Detects mass user and role mentions, and can flag any message that mentions @everyone or @here

    maxUserMentionsmaxRoleMentionscountDuplicatesOncebanEveryoneMention
    Anti-Spam

    Rate-based spam detection for messages, duplicates, links, attachments, and emoji

    messagesPerWindowwindowSecondsduplicateThresholdlinkSpamThresholdattachmentSpamThresholdemojiSpamThreshold
    Anti-Crypto Scam

    Premium. Catches crypto-scam image spam: one member posting several images in several channels within 60 seconds. Their posts from the last hour are cleaned up too.

    minImageschannelThreshold
    Each detector can be individually enabled/disabled and configured with its own action, log channel, and disabled channels/roles exemptions.

    Default Blocked Words

    The Bad Words detector includes a built-in list of about 50 English profanity, slur and slang words. Short entries such as "hell", "af" and "cum" match only as whole words (with plain endings like "s" or "ed"), so ordinary words like "hello", "after" and "document" are never caught. Longer entries also match inside other words, so their longer forms are still caught.

    Common Profanityfuck, shit, asshole, bitch, dick, ...
    Hate Speech / Slursnigger, faggot, retard, chink, ...
    Sexual Contentporn, hentai, nude, cock, ...
    Insults / Leet-Speakwhore, cunt, stfu, wtf, ...

    Use Default List

    toggle

    Enable the built-in blocked words list (enabled by default)

    Custom Words

    text[]

    Add your own words to supplement or replace the default list. Press Enter after each word.

    Case Insensitive

    toggle

    Match words regardless of capitalization (enabled by default)

    Match Whole Word

    toggle

    Applies to your custom words: only complete words match (off by default, so a custom word also matches inside longer words). The default list decides this for each of its own words.

    The default list is stored in defaultBlockedWords.js and can be extended server-by-server via the Custom Words field in the dashboard. Servers that need stricter filtering should add entries there rather than modifying the bot source.

    Duration Format

    Duration options in moderation commands are whole numbers of seconds. Units such as 10m or 1h are not accepted.

    Seconds per unit

    1Seconds1 second = 1
    60Minutes1 minute = 60
    3600Hours1 hour = 3600
    86400Days1 day = 86400

    Examples

    600600 — 10 minutes
    36003600 — 1 hour
    3030 — 30 seconds
    129600129600 — 1 day and 12 hours
    604800604800 — 7 days
    90009000 — 2 hours and 30 minutes
    Type the number only. /mute, /vmute and /timeout accept up to 2419200 seconds (28 days), which is also Discord's timeout limit.

    Supported Auto-Revert Actions

    When a duration is given, the action is undone automatically when it runs out. For example, /mute with duration 600 unmutes the member after 10 minutes. /ban has no duration option: a ban is lifted automatically only when its Auto-Revert setting is on.

    ban → unbanauto-revert
    mute → unmuteauto-revert
    vmute → vunmuteauto-revert
    lock → unlockauto-revert
    slowmode → resetauto-revert
    timeout — Discord nativeDiscord native
    A duration typed by the moderator is always honoured, whatever the Auto-Revert setting says. Without one, a mute or voice mute stays until someone lifts it, unless Auto-Revert (premium) is on, in which case it is lifted after Revert After.

    Auto-Revert & Scheduler

    Duration-based moderation actions automatically schedule a revert. When a moderator specifies a duration (e.g., /mute user:@user duration:600), the bot schedules an auto-unmute for 10 minutes later.

    1Command with Duration

    Moderator runs a command with a duration option (e.g., /mute user:@user duration:600). The action is applied immediately.

    2Schedule Created

    A ScheduledAction document is stored in MongoDB with the revert action (e.g., unmute) and fireAt timestamp.

    3Periodic Sweep

    The scheduler service runs a periodic sweep, finding all actions where fireAt has passed. It uses broadcastEval to execute on the correct shard.

    4Auto-Revert Executed

    The revert action runs (e.g., unmute), a companion "system" case is created, and the ScheduledAction document is removed.

    Escalation System

    The escalation system punishes repeat offenders automatically. Each time a member is warned (by /warn or by an auto-mod detector set to Warn), it counts their active warns within each rule's window and applies the strictest rule they reach. /unwarn lifts a warn (the latest active one, or a given case number), so it stops counting.

    Example Escalation Rules

    3 warns→ Mute (1h)
    5 warns→ Kick
    7 warns→ Ban

    Escalation Rules

    rules[]

    Each rule sets a warn count, a window in days (7 by default), an action (mute, timeout, kick or ban) and, for mute or timeout, a duration in seconds. Free servers get one rule.

    Case Management

    Moderation and security actions create a case with an auto-incrementing case ID. /lock, /unlock, /slowmode, /setnick and /move do not create cases. Cases track the full lifecycle of an action and can be managed from both Discord and the dashboard.

    Case Fields

    Case IDAuto-incrementing integer
    Typeban, mute, kick, warn, timeout, ...
    Sourcecommand, automod, security, escalation, system
    StatusOpen, Under Investigation, Solved, Deleted
    Activetrue/false (action still in effect)

    Status Lifecycle

    Open·Under investigation·Solved·Deleted

    Case Managers

    Case managers can change a case's status from the dashboard and with /case status. On Discord, anyone allowed to run /case can change statuses too. Case managers are read from both the moderation and security modules:

    • Moderation case managers: moderation.master.caseManagerRoles + caseManagerUsers
    • Security case managers: security.caseManagerRoles + caseManagerUsers
    • Guild owner: Always has case management access

    Configuration

    Master Settings

    Whitelist Roles

    roles

    Roles whose messages the auto-mod detectors ignore. Moderation commands still work on them. Premium.

    Whitelist Users

    users

    Users whose messages the auto-mod detectors ignore. Moderation commands still work on them. Up to 3 on the free plan.

    Alert Roles

    roles

    Members of these roles get a DM each time an auto-mod detector acts. One role on the free plan.

    Alert Users

    users

    Users who get a DM each time an auto-mod detector acts. Premium.

    Case Manager Roles

    roles

    Roles that can manage case status (premium)

    Case Manager Users

    users

    Users that can manage case status (up to 3 on the free plan)

    Admin Roles

    roles

    Members with these roles can use every moderation command without the matching Discord permission. Up to 3 on the free plan.

    Moderator Roles

    roles

    Members with these roles can use every moderation command except /ban and /unban, which also need Ban Members or an Admin Role. Up to 3 on the free plan.

    Per-Command Settings

    Each of the 19 moderation commands can be individually configured:

    Enabled

    toggle

    Turn this command/detector on or off

    Require Reason

    toggle

    On by default for /warn, /mute, /timeout, /kick, /ban and /vmute: they refuse to run without a reason. Each of those commands has its own Require Reason switch in the dashboard.

    Log Channel

    channel

    Channel for this command's or detector's log embeds. Leave it empty to use the module's Log Channel. A per-command channel is premium.

    Allowed Roles

    roles

    Roles that can use this command (in addition to Discord permissions)

    Allowed Users

    users

    Users that can use this command

    Disabled Channels

    channels

    Channels where this command/detector cannot be used

    Disabled Roles

    roles

    Members with these roles cannot run this command (the server owner still can) / Members with these roles are ignored by this detector

    Default Duration

    number

    Seconds /timeout uses when no duration is given (600 by default). /mute and /vmute use it only as a fallback when Auto-Revert is on and Revert After is 0.

    Auto-Revert

    toggle

    Premium. When no duration is given, undo a ban, mute, voice mute, lock or slowmode automatically after Revert After. For lock and slowmode, a Revert After of 0 means no revert.

    Revert After

    number

    Seconds after which to auto-revert (when Auto-Revert is on)

    Per-Event Settings (Auto-Mod)

    Each of the 9 auto-mod detectors can be individually configured:

    Enabled

    toggle

    Turn this command/detector on or off

    Action

    select

    What happens when triggered: delete, warn, mute, timeout, kick or ban. Every action also deletes the message.

    Duration

    number

    Duration for the action (e.g., mute for 600 seconds)

    Log Channel

    channel

    Channel for this command's or detector's log embeds. Leave it empty to use the module's Log Channel. A per-command channel is premium.

    Disabled Channels

    channels

    Channels where this command/detector cannot be used

    Disabled Roles

    roles

    Members with these roles cannot run this command (the server owner still can) / Members with these roles are ignored by this detector

    DM on Action

    DM on Action

    toggle

    Premium. DM the member when they are banned, kicked, muted, timed out or warned, whether by a command, an auto-mod detector or escalation.

    DM Message

    text

    Custom message template. Placeholders: {action}, {server}, {reason}. {action} is a single word such as banned, kicked, muted, timed out or warned. Leave it empty to send the default in the bot language.

    template
    You were {action} in {server}. Reason: {reason}

    Log Embeds

    Every moderation command except /case posts an embed to its log channel (the command's own, else the module Log Channel). The embeds share one format for easy scanning:

    • • Emoji + Action Title: 🔨 Ban, 👢 Kick, 🔇 Mute, ⚠️ Warn, 🔒 Channel Locked, etc.
    • • Color Coding: Red (ban), orange-red (kick), amber (mute/timeout), green (un-commands), yellow (warn), grey (channel ops), blue (setnick)
    • • Thumbnail: Target user avatar (or moderator avatar for channel actions)
    • • Fields: Target, Moderator, Duration, Auto-Revert, Reason, Channel
    • • Footer: GuildName • Case #ID (just GuildName for actions that show no case number)
    • • Timestamp: When the action was taken

    Ephemeral Replies

    Slash commands answer the moderator with a compact private embed (emoji, action name and target); ban, mute, timeout, warn and voice mute also show the case ID in the footer. Text commands reply in the channel instead, and the reply deletes itself after the command's Auto-delete reply time (15 seconds by default; changing it is premium) unless it has buttons.

    Best Practices

    ✓ Recommended Setup

    • • Start with auto-mod detectors set to delete action before escalating to warn/mute
    • • Write a clear reason every time: /ban, /kick, /mute, /timeout, /warn and /vmute refuse to run without one
    • • Add your mod team as case managers (users, or roles on premium) so they can manage cases from the dashboard
    • • Set up escalation rules to automatically handle repeat offenders
    • • Use Disabled Channels for bot-command channels where spam detection isn't needed
    • • Enable DM on Action (premium) so users know why they were punished
    • • Use duration options for temporary actions — auto-revert ensures nothing is forgotten

    ✗ Common Mistakes

    • • Setting auto-mod action to ban for first offenses (too aggressive)
    • • Not whitelisting your staff (auto-mod acts on their messages too; bots and the server owner are always skipped)
    • • Forgetting to set a log channel (no visibility into actions)
    • • Using permanent mutes/bans without duration when temporary action is intended
    • • Not testing escalation rules before enabling (can lead to unexpected bans)
    • • Adding too many custom words to Bad Words without Match Whole Word (causes false positives)
    Bot Hierarchy Requirement: The bot's role must be positioned higher than the Muted role and any roles it needs to manage. For ban/kick commands, the bot needs the corresponding Discord permissions. For the mute command, the bot auto-creates a Muted role and configures channel permission overwrites.