ZMN Bot Documentation
Setup guides and configuration reference for every ZMN module — security, moderation, roles, leveling, and access control.
Quick Navigation
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 CommandBan a user from the server
/ban <user> [reason] [delete_days]/unbanSlash CommandUnban a previously banned user
/unban <user_id> [reason]/kickSlash CommandKick a user from the server
/kick <user> [reason]/muteSlash CommandMute a user (auto-creates Muted role)
/mute <user> [reason] [duration]/unmuteSlash CommandRemove mute from a user
/unmute <user> [reason]/timeoutSlash CommandDiscord native timeout (max 28 days)
/timeout <user> [reason] [duration]/untimeoutSlash CommandRemove timeout from a user
/untimeout <user> [reason]/warnSlash CommandIssue a warning (triggers escalation check)
/warn <user> [reason]/unwarnSlash CommandLift a warning so it stops counting toward warn totals and escalation
/unwarn <user> [reason] [case]Channel Management
/lockSlash CommandLock a channel preventing messages
/lock [channel] [reason] [duration]/unlockSlash CommandUnlock a previously locked channel
/unlock [channel] [reason]/slowmodeSlash CommandSet slowmode delay in a channel (premium)
/slowmode <seconds> [channel] [duration]/clearSlash CommandBulk delete recent messages in this channel
/clear <amount> [user]Voice Moderation
/vmuteSlash CommandMute a user in voice channels
/vmute <user> [reason] [duration]/vunmuteSlash CommandRemove voice mute from a user
/vunmute <user> [reason]/vkickSlash CommandDisconnect a user from their voice channel
/vkick <user> [reason]/moveSlash CommandMove a user between voice channels
/move <user> <channel>User Management
/setnickSlash CommandChange a user's nickname
/setnick <user> [nickname]/caseSlash CommandLook up one case, list a member's cases, or change a case's status
/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
Repeated Text
Detects repeated characters, words, lines, and excessive emoji usage
Discord Invites
Detects Discord invite links with options to allow own guild and specific invite codes
External Links
Domain blocklist/allowlist with media embed options and URL shortener blocking (premium)
Excessive Caps
Detects messages with excessive capitalization based on percentage threshold
Excessive Spoilers
Detects too many spoiler tags or excessive spoiler content length
Mass Mentions
Detects mass user and role mentions, and can flag any message that mentions @everyone or @here
Anti-Spam
Rate-based spam detection for messages, duplicates, links, attachments, and emoji
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.
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.
fuck, shit, asshole, bitch, dick, ...nigger, faggot, retard, chink, ...porn, hentai, nude, cock, ...whore, cunt, stfu, wtf, ...Use Default List
toggleEnable 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
toggleMatch words regardless of capitalization (enabled by default)
Match Whole Word
toggleApplies 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.
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 = 160Minutes1 minute = 603600Hours1 hour = 360086400Days1 day = 86400Examples
600600 — 10 minutes36003600 — 1 hour3030 — 30 seconds129600129600 — 1 day and 12 hours604800604800 — 7 days90009000 — 2 hours and 30 minutesSupported 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.
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
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
Auto-incrementing integerban, mute, kick, warn, timeout, ...command, automod, security, escalation, systemOpen, Under Investigation, Solved, Deletedtrue/false (action still in effect)Status Lifecycle
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
rolesRoles whose messages the auto-mod detectors ignore. Moderation commands still work on them. Premium.
Whitelist Users
usersUsers whose messages the auto-mod detectors ignore. Moderation commands still work on them. Up to 3 on the free plan.
Alert Roles
rolesMembers of these roles get a DM each time an auto-mod detector acts. One role on the free plan.
Alert Users
usersUsers who get a DM each time an auto-mod detector acts. Premium.
Case Manager Roles
rolesRoles that can manage case status (premium)
Case Manager Users
usersUsers that can manage case status (up to 3 on the free plan)
Admin Roles
rolesMembers with these roles can use every moderation command without the matching Discord permission. Up to 3 on the free plan.
Moderator Roles
rolesMembers 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
toggleTurn this command/detector on or off
Require Reason
toggleOn 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
channelChannel 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
rolesRoles that can use this command (in addition to Discord permissions)
Allowed Users
usersUsers that can use this command
Disabled Channels
channelsChannels where this command/detector cannot be used
Disabled Roles
rolesMembers with these roles cannot run this command (the server owner still can) / Members with these roles are ignored by this detector
Default Duration
numberSeconds /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
togglePremium. 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
numberSeconds 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
toggleTurn this command/detector on or off
Action
selectWhat happens when triggered: delete, warn, mute, timeout, kick or ban. Every action also deletes the message.
Duration
numberDuration for the action (e.g., mute for 600 seconds)
Log Channel
channelChannel 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
channelsChannels where this command/detector cannot be used
Disabled Roles
rolesMembers 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
togglePremium. 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
textCustom 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.
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)

