Moderation
Moderation commands for managing server users. All require having a role from the Moderation Roles list (configured in the dashboard).
Role Hierarchy
All moderation commands (except /clear and /warnings) check role hierarchy — you cannot moderate a user whose highest role is above yours.
Commands
/ban
Bans a user from the server. Before banning, sends a DM with information (if dm_on_action is enabled).
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to ban |
| reason | string | No | Ban reason (max 512 characters) |
Permissions: Moderation Roles
Example: /ban target:@ToxicUser reason:Spam and offensive language
Success: Ephemeral confirmation + log in "moderation" module
Errors:
- Missing moderation permissions
- Target has a higher role than the moderator
- Bot doesn't have
ban_memberspermission
/kick
Kicks a user from the server. Before kicking, sends a DM with information.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to kick |
| reason | string | No | Kick reason (max 512 characters) |
Permissions: Moderation Roles
Example: /kick target:@Troublemaker reason:Multiple warnings
Success: Ephemeral confirmation + log
Errors:
- Missing moderation permissions
- Target has a higher role
- Bot doesn't have
kick_memberspermission
/mute
Mutes a user (Discord timeout). The user cannot type or speak for the specified duration.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to mute |
| duration | integer | No | Time in minutes (1–40320, default 10) |
| reason | string | No | Mute reason (max 512 characters) |
Permissions: Moderation Roles
Example: /mute target:@Spammer duration:60 reason:Channel spam
Success: Ephemeral confirmation + DM to user + log
Errors:
- Missing moderation permissions
- Invalid duration (outside 1–40320 range)
- Target has a higher role
- Bot doesn't have
moderate_memberspermission
Maximum Duration
40320 minutes = 28 days — this is the maximum timeout limit in the Discord API.
/unmute
Removes the mute (timeout) from a user.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to unmute |
| reason | string | No | Unmute reason (max 512 characters) |
Permissions: Moderation Roles
Example: /unmute target:@User reason:Penalty time served
Success: Ephemeral confirmation + log
Errors:
- Missing moderation permissions
- Target has a higher role
- Bot doesn't have
moderate_memberspermission
/warn
Issues a warning to a user. The warning is saved in the database and a DM is sent.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to warn |
| reason | string | No | Warning reason (max 512 characters) |
Permissions: Moderation Roles
Example: /warn target:@User reason:Inappropriate language
Success: Ephemeral confirmation + DM + log + warning threshold check
Errors:
- Missing moderation permissions
- Target has a higher role
- Database error
Warning Threshold
When a user reaches the configured warning threshold (warning_threshold, default 3), the bot sends a notification to the moderation log channel. The notification is sent exactly once — at the moment the threshold is reached.
/warnings
Displays a user's warning history (up to 10 most recent).
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to check |
Permissions: Moderation Roles
Example: /warnings target:@User
Success: List of warnings with ID, moderator, date, and reason
Errors:
- Missing moderation permissions
- No warnings (info message)
- Database error
/clear
Deletes a specified number of messages from the current channel.
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | integer | Yes | Number of messages to delete (1–100) |
Permissions: Moderation Roles
Example: /clear amount:50
Success: Ephemeral confirmation with number of deleted messages + log
Errors:
- Missing moderation permissions
- Invalid number (outside 1–100)
- Bot doesn't have
manage_messagespermission
14-Day Limit
Discord does not allow deleting messages older than 14 days via bulk delete. Messages older than 14 days will not be removed.
/setnick
Changes a user's nickname on the server.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User whose nickname to change |
| nickname | string | No | New nickname (empty = reset to username) |
Permissions: Moderation Roles
Example: /setnick target:@User nickname:New Nick
Success: Ephemeral confirmation with old → new nick + log
Errors:
- Missing moderation permissions
- Target has a higher role
- Nickname too long/short (1–32 characters)
- Bot doesn't have
manage_nicknamespermission
/role add
Adds a role to a user.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to add the role to |
| role | Role | Yes | Role to add |
Permissions: Moderation Roles
Example: /role add target:@User role:@VIP
Success: Ephemeral confirmation + log
Errors:
- Missing moderation permissions
- Target has a higher role
- Role is above the bot's highest role (bot hierarchy error)
- User already has this role
- Bot doesn't have
manage_rolespermission
/role remove
Removes a role from a user.
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | Member | Yes | User to remove the role from |
| role | Role | Yes | Role to remove |
Permissions: Moderation Roles
Example: /role remove target:@User role:@Muted
Success: Ephemeral confirmation + log
Errors:
- Missing moderation permissions
- Target has a higher role
- Role is above the bot's highest role
- User doesn't have this role
- Bot doesn't have
manage_rolespermission
/lockdown
Locks a channel — only slash commands, bots (if allowed), and whitelisted roles can post. All other messages are automatically deleted.
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel | TextChannel | Yes | Channel to lock |
| allowed_commands | string | No | Comma-separated list of allowed commands (e.g. apc,poll) |
| allow_bots | boolean | No | Allow bot messages (default: true) |
| on_violation | choice | No | Action on violation: "Delete silently" / "Delete + reply" / "Delete + DM" |
Permissions: Moderation Roles
Example: /lockdown channel:#apc-ranking allowed_commands:apc
Success: Ephemeral confirmation + log
Errors:
- Missing moderation permissions
- Channel is already locked
Allowed Commands
The allowed_commands parameter is informational — it tells users which commands are available in the channel. All slash commands always work regardless of this setting, because they are processed as interactions (not messages).
/unlock
Unlocks a previously locked channel, restoring normal message posting.
| Parameter | Type | Required | Description |
|---|---|---|---|
| channel | TextChannel | Yes | Channel to unlock |
Permissions: Moderation Roles
Example: /unlock channel:#apc-ranking
Success: Ephemeral confirmation + log
Errors:
- Missing moderation permissions
- Channel is not locked
/slowmode
Sets slowmode on a channel, optionally auto-removing after a specified duration.
| Parameter | Type | Required | Description |
|---|---|---|---|
| seconds | integer (0–21600) | Yes | Slowmode delay in seconds (0 to disable) |
| duration | integer | No | Auto-remove after X minutes |
| channel | TextChannel | No | Target channel (default: current) |
Permissions: Moderation Roles
Example: /slowmode seconds:10 duration:30 channel:#general
/userinfo
Displays information about a server member in an embed.
| Parameter | Type | Required | Description |
|---|---|---|---|
| member | Member | No | Member to inspect (default: yourself) |
Permissions: None (anyone can use)
Example: /userinfo member:@User
/serverinfo
Displays information about the current server in an embed.
Permissions: None (anyone can use)
Example: /serverinfo
Configuration
Moderation settings are configured in the dashboard (cog "Moderation"):
| Option | Description | Default Value |
|---|---|---|
moderation_roles | List of roles with moderation permissions | none (commands unavailable) |
warning_threshold | Warning threshold for notification | 3 |
dm_on_action | Whether to send DM to moderated user | true |
auto_delete_warnings_days | Auto-delete old warnings (0 = disabled) | 0 |
Important
If you don't configure any moderation_roles, no user will be able to use moderation commands (even server administrators). Add at least one role in the dashboard.