Moderation
The Moderation module provides a complete set of tools for managing users: banning, kicking, muting, warnings, clearing messages, changing nicknames, and managing roles.
Enabling the Module
- Dashboard → Your server → toggle Moderation
- Click Edit and add moderation roles
- Save changes
Without configuring moderation_roles, no moderation command will work — this applies to all users, including Discord administrators. At least one role must be added to the list, and the user must have one of these roles for the commands to work.
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
moderation_roles | role ID list | [] | Roles with access to moderation commands |
warning_threshold | number (1–10) | 3 | Warning threshold — sends a notification to logs when reached |
dm_on_action | boolean | true | Whether to send a DM to the user about the moderation action |
auto_delete_warnings_days | number | 0 | Auto-delete old warnings (0 = disabled) |
Dashboard configuration
The Moderation module edit panel contains:
- Moderation Roles — multi-select with server roles
- Warning Threshold — slider 1–10
- DM on Action — checkbox
- Auto-delete Warnings — number field (days, 0 = off)
Commands
/ban
Bans a user from the server.
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User to ban |
reason | ❌ | Reason (max 512 characters) |
/kick
Kicks a user from the server.
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User to kick |
reason | ❌ | Reason (max 512 characters) |
/mute
Mutes a user (Discord timeout).
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User to mute |
duration | ❌ | Time in minutes (1–40320, default 10) |
reason | ❌ | Reason (max 512 characters) |
40320 minutes = 28 days (maximum Discord timeout limit).
/unmute
Removes the mute (timeout) from a user.
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User to unmute |
reason | ❌ | Reason (max 512 characters) |
/warn
Issues a warning to a user (saved in the database).
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User to warn |
reason | ❌ | Reason (max 512 characters) |
After issuing a warning:
- The warning is saved in the
warningstable - The user receives a DM (if
dm_on_actionis enabled) - The bot checks if the
warning_thresholdhas been reached - If so — sends a notification to the moderation log channel
/warnings
Displays a user's warning history (last 10).
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User to check |
/clear
Deletes messages from the current channel.
| Parameter | Required | Description |
|---|---|---|
amount | ✅ | Number of messages (1–100) |
/setnick
Changes a user's nickname.
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User |
nickname | ❌ | New nickname (empty = reset to username) |
Discord limits nicknames to 1–32 characters.
/role add
Assigns a role to a user.
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User |
role | ✅ | Role to assign |
/role remove
Removes a role from a user.
| Parameter | Required | Description |
|---|---|---|
target | ✅ | User |
role | ✅ | Role to remove |
Role Hierarchy
All commands respect the Discord role hierarchy:
- A moderator cannot perform an action on a user with a higher role
- The bot cannot manage roles higher than its own
If the hierarchy doesn't allow the action, the bot returns a "hierarchy_error".
DM to User
When dm_on_action is enabled, the bot sends an embed to the user before performing the action:
- Information about the action type (banned from / kicked from / muted in / warned in)
- Server name
- Duration (for mute)
- Reason (if provided)
The DM is sent "best effort" — if the user has DMs disabled or has blocked the bot, the action will still execute.
Auto-delete Warnings
If auto_delete_warnings_days > 0, every 6 hours the bot automatically deletes warnings older than the specified number of days. Useful for maintaining current history and automatically "expiring" old warnings.
Logging
Every moderation action is logged by the Logs module under the moderation category. Logs contain:
- Action type (ban, kick, mute, warn, clear, setnick, role_add, role_remove)
- Target (target user)
- Moderator (who performed it)
- Reason
Tips
- Set
warning_thresholdto 3–5 to receive notifications about problematic users - Enable
dm_on_actionso users know why they were punished - Use
/warningsbefore taking more serious actions (ban/kick) - Configure moderation logs to have a full audit trail