Moderation
Moderation commands for managing server users. All require having a role from the Moderation Roles list (configured in the dashboard).
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
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
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
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
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 |
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.