Raptor Bot Documentation
Home
Guide
Commands
Home
Guide
Commands
  • Commands

    • Moderation Commands
    • Message Filtering Commands
    • Anti-Spam System
    • Modmail Commands
    • Settings Commands
    • Autorole Commands
    • Mass Role Commands
    • Role Persistence Commands
    • Role Locker Commands
    • Reaction Role Commands
    • Wiki Monitor
    • Fun & Easter Eggs
    • Utility Commands
    • MediaHooks
    • Anti-Nuke Commands

Role Locker Commands

Protect key roles from manual or unauthorized removal from members.

Overview

The Role Locker system allows server administrators to secure specific roles. Once a role is added to the locker list, any manual removal of that role by a user (e.g. from the Discord member list) will be automatically intercepted, blocked, and reverted by Raptor. The role is instantly restored, and an alert is logged to the server's mod logs.

Core Settings Integration

To bypass the lock and safely remove a locked role from a member, authorized moderators/admins must use the new /removerole slash command.


rolelocker add

Adds a role to the Role Locker list.

Usage:

/rolelocker add [role]

Example:

/rolelocker add @Verified

Requirements:

  • Bot must have Manage Roles permission.
  • Bot's highest role must be above the role you are adding.

Permissions Required: Configured Admin role.


rolelocker remove

Removes a role from the Role Locker list.

Usage:

/rolelocker remove [role]

Example:

/rolelocker remove @Verified

Effect:

  • The role is no longer protected and can be freely assigned or removed manually by standard Discord role editors.

Permissions Required: Configured Admin role.


rolelocker list

Lists all roles currently protected by the Role Locker.

Usage:

/rolelocker list

Permissions Required: Moderator or higher.


addrole

Safely assigns a locked role to a member, bypassing the Role Locker assignment block.

Usage:

/addrole [member] [role] [optional: reason]

Example:

/addrole @Wumpus @Verified Good behavior

Permissions Required: Configured Moderator/Admin, or specifically whitelisted users/roles in the locked role configuration.


removerole

Safely removes a locked role from a member, bypassing the Role Locker block.

Usage:

/removerole [member] [role] [optional: reason]

Example:

/removerole Wumpus @Verified Suspended for rules violation

Permissions Required: Configured Moderator/Admin, or specifically whitelisted users/roles in the locked role configuration.


How It Works

  1. Role Modification Interception: When a member's roles are updated, Raptor checks if any added or removed role is on the Role Locker list.
  2. Bypass Verification: Raptor checks if a bypass flag is active in Redis (meaning the action was initiated via /addrole or /removerole) or if the audit logs show the action was performed by Raptor itself.
  3. Reversion & Alerting: If no bypass is found (e.g., a moderator or admin manually assigns or removes the role via the Discord native UI), Raptor instantly reverts the action (removes the role if added, or restores it if removed) and logs a 🔒 Role Locker Enforced warning in the mod logs channel.
  4. Granular Permissions & Whitelisting: Through the Web Dashboard, administrators can configure specific bypass whitelists for each locked role, specifying whether admins/mods only can manage them, as well as listing specific roles or user IDs allowed to bypass. The server owner and the user who initially set up the locker are permanently whitelisted for full bypass access.

Web Dashboard Management

You can also manage these settings visually:

  1. Go to your Web Dashboard.
  2. Navigate to Core Settings.
  3. Look for the Role Locker Configuration section (indicated by the red lock icon).
  4. You can view, add, and remove protected roles, edit their whitelists, and save modifications directly from the interface.
Prev
Role Persistence Commands
Next
Reaction Role Commands