Moderation commands
Staff commands for warnings, timeouts, kicks, bans, purges, and reversals.
Moderation commands use Discord default member permissions in the slash command definition. They also perform runtime checks for self-targeting, server owner protection, role hierarchy, and Discord capability flags such as bannable, kickable, and moderatable where needed.
| Command | Options | Permission | Description |
|---|---|---|---|
/warn | target required user, reason required string max 512 | Kick Members | DMs the member a warning when possible and records a WARN moderation case. No cooldown. |
/timeout | target required user, duration required choice, reason required string max 512 | Moderate Members | Applies a Discord timeout. Choices: 60s, 5m, 10m, 1h, 6h, 12h, 1d, 3d, 7d, 28d. Records a TIMEOUT case. |
/unmute | target required user, reason optional string max 512 | Moderate Members | Clears an active communication timeout and records an UNMUTE case. |
/kick | target required user, reason required string max 512 | Kick Members | Kicks a member unless hierarchy or owner checks block it, then records a KICK case. |
/ban | target required user, reason optional string max 512, duration optional string, purge_messages optional boolean | Ban Members | Bans a user permanently or temporarily. Duration accepts 30s, 5m, 12h, 1d, 1w; purge deletes last 24 hours of messages. Records a BAN case. |
/unban | user_id required string, reason optional string max 512 | Ban Members | Validates a 17–20 digit snowflake, confirms the user is banned, removes the ban, and records an UNBAN case. |
/purge | amount required integer 1–100, target optional user | Manage Messages | Fetches up to amount recent messages in the current text channel and bulk-deletes matching, unpinned messages younger than 14 days. |
Bot hierarchy
Discord can reject actions even when the moderator has permission. Put the bot role above roles it needs to moderate.
