Skip to main content

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).

ParameterTypeRequiredDescription
targetMemberYesUser to ban
reasonstringNoBan 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_members permission

/kick

Kicks a user from the server. Before kicking, sends a DM with information.

ParameterTypeRequiredDescription
targetMemberYesUser to kick
reasonstringNoKick 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_members permission

/mute

Mutes a user (Discord timeout). The user cannot type or speak for the specified duration.

ParameterTypeRequiredDescription
targetMemberYesUser to mute
durationintegerNoTime in minutes (1–40320, default 10)
reasonstringNoMute 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_members permission
note

40320 minutes = 28 days — this is the maximum timeout limit in the Discord API.


/unmute

Removes the mute (timeout) from a user.

ParameterTypeRequiredDescription
targetMemberYesUser to unmute
reasonstringNoUnmute 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_members permission

/warn

Issues a warning to a user. The warning is saved in the database and a DM is sent.

ParameterTypeRequiredDescription
targetMemberYesUser to warn
reasonstringNoWarning 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).

ParameterTypeRequiredDescription
targetMemberYesUser 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.

ParameterTypeRequiredDescription
amountintegerYesNumber 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_messages permission
warning

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.

ParameterTypeRequiredDescription
targetMemberYesUser whose nickname to change
nicknamestringNoNew 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_nicknames permission

/role add

Adds a role to a user.

ParameterTypeRequiredDescription
targetMemberYesUser to add the role to
roleRoleYesRole 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_roles permission

/role remove

Removes a role from a user.

ParameterTypeRequiredDescription
targetMemberYesUser to remove the role from
roleRoleYesRole 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_roles permission

Configuration

Moderation settings are configured in the dashboard (cog "Moderation"):

OptionDescriptionDefault Value
moderation_rolesList of roles with moderation permissionsnone (commands unavailable)
warning_thresholdWarning threshold for notification3
dm_on_actionWhether to send DM to moderated usertrue
auto_delete_warnings_daysAuto-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.