Skip to content

Moderation

The Discord bot provides a robust set of moderation commands to help server administrators manage user behavior and maintain a safe community. These commands allow moderators to issue warnings, mute or ban users, manage messages, and control channel activity.

Overview

Moderation is essential for enforcing server rules and ensuring a positive environment. The bot’s moderation commands enable actions such as banning or kicking users, muting them to prevent messaging, deleting messages in bulk, or enabling slowmode to limit message frequency. These commands are designed for users with appropriate permissions (e.g., BAN_MEMBERS, KICK_MEMBERS, MANAGE_MESSAGES) and can be configured to log actions to a designated channel for transparency.

Moderation Commands

The following commands are used for moderation tasks. Most require specific permissions, such as BAN_MEMBERS, KICK_MEMBERS, or MANAGE_MESSAGES, depending on the action.

CommandDescriptionParameters
/banBans a specified user from the server.user (user, required): The user to ban.
reason (string, optional): Reason for the ban.
delete_message_days (integer, optional): Number of days to delete messages (0-7).
/kickKicks a specified user from the server.user (user, required): The user to kick.
reason (string, optional): Reason for the kick.
/muteMutes a specified user, preventing them from sending messages.user (user, required): The user to mute.
duration (string, optional): Duration of the mute (e.g., '30m', '1h').
/purgeDeletes a specified number of messages from the channel.amount (integer, required): Number of messages to delete (1-100).
/slowmodeEnables or configures slowmode for a channel to limit message frequency.duration (string, required): Slowmode duration (e.g., '5s', '1m', 'off').
/unbanUnbans a specified user, allowing them to rejoin the server.user_id (string, required): The ID of the user to unban.
/unmuteUnmutes a specified user, restoring their ability to send messages.user (user, required): The user to unmute.
/warnIssues a warning to a specified user.user (user, required): The user to warn.
reason (string, optional): Reason for the warning.

Example

To ban a user with a reason and delete their messages from the past day:

/ban @user Spamming 1

To kick a user:

/kick @user Disruptive behavior

To mute a user for 30 minutes:

/mute @user 30m

To delete 50 messages in a channel:

/purge 50

To set a 5-second slowmode:

/slowmode 5s

Configuration

Moderation actions can be logged to a designated channel for transparency.

To configure moderation logging:

  1. Open your server on the Dashboard: https://lockieapp.ca
  2. Go to the Logging section.
  3. Set a moderation log channel.

How It Works

  • Ban and Kick: The /ban and /kick commands remove users from the server, with /ban preventing rejoining and optionally deleting recent messages. Both support reasons for logging and transparency.
  • Mute and Unmute: The /mute command applies a timeout to prevent messaging, while /unmute removes it using the enable_communication method for efficiency.
  • Purge: The /purge command deletes messages in bulk, up to 100 at a time, useful for cleaning spam or off-topic content.
  • Slowmode: The /slowmode command sets a per-user message cooldown to reduce spam or flooding.
  • Warn: The /warn command logs a warning, which can be tracked for escalation (e.g., leading to mutes or bans).
  • Logging: Moderation actions (e.g., bans, kicks, mutes) can be logged to a channel set on the Dashboard, providing an audit trail for moderators.

Best Practices

  • Set a Logging Channel: Set your moderation log channel on the Dashboard so all moderation actions are recorded for review.
  • Use Reasons: Provide clear reasons for /ban, /kick, and /warn to maintain transparency and assist with appeals.
  • Test Commands: Try commands like /mute or /purge in a test channel to understand their impact before using them in critical channels.
  • Combine with AutoMod: Enable Discord’s built-in AutoMod or Lockie’s protection modules on the Dashboard to complement manual moderation.
  • Communicate Actions: Inform users of moderation actions (e.g., via DMs or announcements) to maintain trust in the community.

Limitations

  • Some commands (e.g., /ban, /kick) require the bot to have higher role permissions than the target user.
  • The /purge command is limited to 100 messages per execution due to Discord API restrictions.

For more details on all commands, see the Commands page.