Bot Documentation

Gavel — Moderation

A complete enforcement suite for Discord: AutoMod with a punishment ladder, raid protection, anti-nuke for insider damage, AdminSaver impersonation defense, a unified modpanel, warnings, and full case history. Everything runs through slash commands and interactive panels.

Required permissions

On invite, grant Gavel the following so every feature works out of the box: Manage Roles, Manage Channels, Kick Members, Ban Members, Moderate Members (timeout), Manage Messages, View Audit Log, and Send Messages / Embed Links.

View Audit Log is not optional if you want anti-nuke. Without it Discord never tells Gavel who deleted a channel or a role, so anti-nuke sees nothing at all. Run /antinuke with no options and it will tell you exactly which permissions are missing.

Who can run what

Gavel checks two levels. Moderator means Discord's Moderate Members or Manage Messages permission, or a role you named as a mod role during setup. Administrator means Discord's Administrator permission, or a role you named as an admin role. Configuration commands need Administrator; day-to-day enforcement needs Moderator.

Setup

  1. 1

    Run /setup

    The interactive wizard walks three steps: your moderator and admin roles, your log channels, and AutoMod protection. Every step can be skipped, and you can re-run the wizard any time. Administrator only.

  2. 2

    Route your logs with /logs

    Eight log categories — mod actions, AutoMod, AdminSaver, members, messages, channels, roles, and invites. Each category gets one umbrella channel, and you can override individual event types with their own channel.

  3. 3

    Turn on protection

    Open /automod for content filtering and the punishment ladder, /raidprotection for join-flood defense, and /antinuke for insider damage. All three are off or inert by default — nothing punishes anyone until you choose it.

  4. 4

    Post /welcome (optional)

    Drops a Gavel welcome card with quick-start buttons into the current channel, so your staff can find the panels without reading the docs.

Gavel ships deliberately quiet. Raid protection, anti-nuke and the age-based auto-kick all default to off or to alert-only, so installing the bot never starts punishing your members before you have decided what it should do.

AutoMod — /automod

/automod opens the configuration panel: Protection Settings, Punishment Config, Whitelist, and a Testing tool that lets you run a sample message through the filters before you trust them. Administrator only.

What it detects

Seven filters you can toggle and tune individually: Spam Protection, Bad Words (your own word list), Invite Filter, Caps Filter, Mention Spam, Image Spam, and Hyperlink Spam. Two more run alongside them: emoji spam (flags at more than 10 emoji in a message by default) and zalgo text (flags at more than 20 stacked combining characters). Both are always on and are not adjustable yet — their thresholds are fixed at those values.

The punishment ladder

Under Punishment Config you choose how many escalation levels to use — one through four — and what each level does. The available actions are delete message, warn, timeout, kick, and ban, so a one-level ladder can kick on first offence while a four-level ladder walks the full delete → warn → timeout → ban path. Whitelisted roles skip the filters entirely.

Malware scanning

A premium add-on inside the same panel. When enabled, file attachments are uploaded to VirusTotal and scanned before your members open them. You choose the scope (every channel, or a named list) and the response — delete the file only, warn, timeout, kick, or ban — with timeout durations from 5 minutes to 24 hours. Files over 32 MB are skipped, and the scan runs for everyone including moderators. Servers without an active premium subscription are skipped silently.

Raid protection — /raidprotection

Join-rate raid detection. /raidprotection takes one option, mode, and it is required:

/raidprotection mode: Off

The default. No detection, no alerts, no action.

/raidprotection mode: Alert only

Detects raids and posts to your alert channel. Punishes nobody. The right first setting for any server.

/raidprotection mode: Enforce

Detects and responds automatically, escalating by how bad the raid looks.

Detection watches three signals: join floods (10 joins inside 60 seconds by default), message spam (50 messages in 30 seconds from at least 5 distinct accounts), and mention spam (20 mentions inside 30 seconds).

What Enforce actually does

Responses are graded by severity rather than fired all at once. A low severity detection alerts only; medium applies slowmode; high applies an emergency lockdown; critical bans the accounts that just joined. A detection also arms a raid window — 10 minutes by default — which de-duplicates repeat alerts for the same raid. Arming that window is itself inert unless you change it: by default it only quiets the alerts and punishes nobody.

The account-age gate

Accounts younger than the age threshold — 24 hours by default, and the unit is hours — count toward raid severity, which is how a wave of brand-new accounts registers as worse than the same number of regulars. Acting on age is separate and defaults to doing nothing; you can set it to kick or ban young accounts, but you have to ask for that.

Raid and anti-nuke alerts share one channel. Set it with the alert_channel option on /antinuke. Gavel checks that it can actually post there and refuses the channel with a plain explanation if Send Messages or Embed Links is missing, rather than saving a channel it will fail on later.

Anti-nuke — /antinuke

Raid protection watches the front door. Anti-nuke watches the people who are already inside. A compromised admin account or a staff member going rogue does not join and does not post — it just starts deleting — so nothing else in the bot ever notices. Anti-nuke reads the audit log and counts destructive actions per account.

What it watches by default

Three actions: channel deletions, role deletions, and webhook creations. When one account crosses the threshold — 5 of those actions inside 30 seconds by default — Gavel responds.

Bans and kicks are deliberately not counted. They are the two most common legitimate moderator actions, and during a real raid a moderator banning raiders looks exactly like an insider destroying the server. Counting them by default would strip or ban the people defending your server. That is a design decision, not an oversight.

Options

/antinuke

No options: runs a diagnostic. Shows whether anti-nuke is on, what it is watching, the current response, and every missing permission that would stop it working.

mode

Off (the default), Alert only (warn, punish nobody), Strip roles (remove all the account's removable roles), or Ban.

threshold

How many watched actions trigger a response. 2 to 20, default 5.

window

The time window those actions must fall inside. 10 to 300 seconds, default 30.

alert_channel

Where anti-nuke and raid alerts are posted. Shared by both systems.

Strip roles is usually the right response. It stops the damage immediately and is reversible if the trigger turns out to be a legitimate cleanup, where a ban on a senior staff account is not.

AdminSaver — /adminsaver

Impersonation defense, and the one premium-gated command in Gavel. AdminSaver compares member names against a roster of accounts you explicitly protect and acts on anyone who starts to look like them.

The panel lets you add and remove protected users, review who is currently protected, whitelist accounts that should never be flagged, and test a name against your roster before you rely on it. You choose the sensitivity — high catches near-misses but produces false positives, low only fires on very close matches — and the response: kick, ban, or a 24-hour timeout. Requires Moderator to open, and an active premium subscription on the server.

Moderation commands

All of these require Moderator, and all of them are free.

/modpanel

The unified moderation hub — warn, timeout, kick, ban, clear messages, and look up users and their history from one panel.

/warn

Opens the warn panel: warn a user by name search, remove a single warning, clear a user's warnings, or edit the escalation settings.

/timeout user duration [reason]

Timeout a member. Duration accepts 10m, 1h, 2d and similar, up to Discord's 28-day maximum.

/kick user [reason]

Kick a member from the server, logged as a case.

/ban user [reason]

Ban an account, logged as a case. Works on users who have already left.

/clear amount

Bulk-delete a number of recent messages in the current channel.

/case case_id

Look up a moderation case by its number — action, moderator, target, reason, and timestamp.

/userinfo user

Profile, join date, roles, and moderation history for a member.

There are also two right-click shortcuts. Select any member and choose Apps → Moderation Panel to open the panel already pointed at them, or Apps → Quick Warn to warn them without opening anything.

Warnings and escalation

Out of the box a user reaches the top of the ladder at 3 warnings, warnings never expire, and the only automatic punishment is a 1-hour timeout at level 3 — levels 1 and 2 record the warning and do nothing else. All three of those are yours to change under Settings in the /warn panel: the warning count that maps to the ladder, an auto-reset window after which old warnings stop counting, and what each level does.

Case system

Every moderation action — warn, timeout, kick, ban — is recorded with a case number, the moderator, the target, the reason, and a timestamp. Look up any case with /case, or review a member's whole history through /modpanel or /userinfo.

Logging — /logs

/logs opens the logging panel. Administrator only. There are eight categories: Mod Logs, AutoMod Logs, AdminSaver Logs, Member Logs, Message Logs, Channel Logs, Role Logs, and Invite Logs. Each one takes an umbrella channel that receives everything in that category, and you can then override any individual event type with its own channel — so message deletions can go somewhere separate from message edits while the rest of the category stays together.

Analytics & info

/analytics

Server analytics — AutoMod performance, moderation activity, user engagement, and growth trends, each on its own view. Requires Moderator. Free.

/help

Interactive command browser, grouped by category.

/ping

Gavel's current latency to Discord.

/avatar [user]

Show a member's full-size avatar with PNG, JPG, WEBP and GIF links. Posts to the channel. Defaults to you.

Premium & account

/premium

This server's premium status — whether it is active, when it renews or expires, and a link to subscribe or manage it.

/vote

Your Top.gg vote count, what it is worth in premium hours, and the vote link. You can vote every 12 hours.

/redeem

Turn your Top.gg votes into premium for the server you run it in. Takes no arguments — it uses the votes already on your account.

Each Top.gg vote is worth 12 hours of premium, and 24 hours on weekends. The minimum to redeem is 6 votes, which is 72 hours — three days — applied to the server you run /redeem in.

Premium is per-server, not per-user. Today it unlocks /adminsaver and VirusTotal malware scanning of attachments; everything else on this page — AutoMod, raid protection, anti-nuke, the modpanel, warnings, cases, logging, and analytics — is free.

Web dashboard

Gavel has a web dashboard being brought up to the standard of the other KojinBots dashboards. It will manage the same settings you configure through the slash commands, from a browser instead of a Discord panel: AutoMod rules and the punishment ladder, warning settings, raid protection, anti-nuke, AdminSaver, log channel routing, moderator and admin roles, and read-only views over your case history, warnings, and server analytics.

This dashboard is being rebuilt and is not open yet. Every setting it will manage is already available through the slash commands documented above, so nothing is waiting on it. We will announce it in the Discord when it is ready.