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.
| Command | Description | Parameters |
|---|---|---|
/ban | Bans 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). |
/kick | Kicks a specified user from the server. | user (user, required): The user to kick.reason (string, optional): Reason for the kick. |
/mute | Mutes 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'). |
/purge | Deletes a specified number of messages from the channel. | amount (integer, required): Number of messages to delete (1-100). |
/slowmode | Enables or configures slowmode for a channel to limit message frequency. | duration (string, required): Slowmode duration (e.g., '5s', '1m', 'off'). |
/unban | Unbans a specified user, allowing them to rejoin the server. | user_id (string, required): The ID of the user to unban. |
/unmute | Unmutes a specified user, restoring their ability to send messages. | user (user, required): The user to unmute. |
/warn | Issues 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 1To kick a user:
/kick @user Disruptive behaviorTo mute a user for 30 minutes:
/mute @user 30mTo delete 50 messages in a channel:
/purge 50To set a 5-second slowmode:
/slowmode 5sConfiguration
Moderation actions can be logged to a designated channel for transparency.
To configure moderation logging:
- Open your server on the Dashboard: https://lockieapp.ca
- Go to the Logging section.
- Set a moderation log channel.
How It Works
- Ban and Kick: The
/banand/kickcommands remove users from the server, with/banpreventing rejoining and optionally deleting recent messages. Both support reasons for logging and transparency. - Mute and Unmute: The
/mutecommand applies a timeout to prevent messaging, while/unmuteremoves it using theenable_communicationmethod for efficiency. - Purge: The
/purgecommand deletes messages in bulk, up to 100 at a time, useful for cleaning spam or off-topic content. - Slowmode: The
/slowmodecommand sets a per-user message cooldown to reduce spam or flooding. - Warn: The
/warncommand 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/warnto maintain transparency and assist with appeals. - Test Commands: Try commands like
/muteor/purgein 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
/purgecommand is limited to 100 messages per execution due to Discord API restrictions.
For more details on all commands, see the Commands page.
