> ## Documentation Index
> Fetch the complete documentation index at: https://docs.katofficial.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Guild Moderation

> Moderation actions scoped to a single Discord server

The Guild Moderation cog applies moderation actions within a single Discord server.

## Command Groups

All commands are nested under `/guild`.

### `/guild moderation`

| Command                           | Description                                                                                                                                                                                                        |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/guild moderation ban`           | Bans a member from the guild. Optionally DMs the target with a reason and appeal link.                                                                                                                             |
| `/guild moderation softban`       | Bans and immediately unbans a member to purge their recent messages.                                                                                                                                               |
| `/guild moderation kick`          | Kicks a member from the guild.                                                                                                                                                                                     |
| `/guild moderation mute`          | Times out, image-mutes, or react-mutes a member. Duration and type are configurable.                                                                                                                               |
| `/guild moderation unmute`        | Removes a timeout, image-mute, or react-mute from a member.                                                                                                                                                        |
| `/guild moderation unban`         | Unbans a user from the guild.                                                                                                                                                                                      |
| `/guild moderation clear`         | Bulk-deletes messages in a channel. Supports filtering by user, count, and age.                                                                                                                                    |
| `/guild moderation masskick`      | Kicks multiple members at once.                                                                                                                                                                                    |
| `/guild moderation warn`          | Issues a warning to a member, logged to the audit system.                                                                                                                                                          |
| `/guild moderation quarantine`    | Quarantines a member (strips roles and restricts permissions).                                                                                                                                                     |
| `/guild moderation lockdown`      | Locks or unlocks a channel or the entire server. Re-using the command on an already-locked target toggles it back.                                                                                                 |
| `/guild moderation slowmode`      | Sets the slowmode delay on a channel.                                                                                                                                                                              |
| `/guild moderation nickname`      | Changes or resets a member's nickname.                                                                                                                                                                             |
| `/guild moderation comms`         | Assigns, removes, or lists community service (purgatory). A member must complete a configured number of cleanup tasks before regaining normal access.                                                              |
| `/guild moderation status`        | Shows the full moderation profile for a user within the guild. Supports filtering by action type and looking up a single audit row by ID.                                                                          |
| `/guild moderation bans`          | Browses the server's ban list with pagination. Optionally checks if a specific user ID is banned.                                                                                                                  |
| `/guild moderation waveban`       | Stages users for a wave ban, then executes, lists, or clears the queue. Supports network propagation on execute.                                                                                                   |
| `/guild moderation ignore_ban`    | Manages ban exceptions — allows globally or network-banned users to remain unbanned in this server. Actions: `add`, `revoke`, `list`.                                                                              |
| `/guild moderation sentimentscan` | On-demand sentiment scan over stored message logs. Scopes: guild, channel, user, or role. Configurable look-back window, message cap, time-bucketing granularity, and keyword prefilter. Can attach a JSON report. |

### `/guild management`

| Command                         | Description                                                                                                |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `/guild management audit`       | Browses the guild's internal moderation audit log with pagination.                                         |
| `/guild management customize`   | Configures the bot's per-server profile (name, avatar, colour, etc.).                                      |
| `/guild management appeal_link` | Sets or clears the guild's ban appeal link sent in punishment DMs.                                         |
| `/guild management permissions` | Configures sub-permission grants for guild moderators.                                                     |
| `/guild management log`         | Configures guild log channels. Actions: `set`, `clear`, `view`, `setup`.                                   |
| `/guild management waveban`     | Views or configures waveban settings (auto-execute threshold, notification channel, etc.) for this server. |

### `/guild utility`

| Command                  | Description                           |
| ------------------------ | ------------------------------------- |
| `/guild utility role`    | Adds or removes a role from a member. |
| `/guild utility profile` | Displays a member's avatar or banner. |

## Punishment DMs

When a moderation action is taken, the bot attempts to DM the target with the action type, reason, and appeal link (if configured). DM types supported: ban, softban, kick, timeout, untimeout, warn, unban, quarantine, unquarantine, image-mute, react-mute.

## Permission Requirements

Guild moderation commands require one of:

* `Administrator` Discord permission
* A guild moderator role configured via `/guild management permissions`
* Specific sub-permission grants (e.g. `ban`, `kick`, `manage_automod`)
