Role Persistence Commands
Ensure members get specific roles back when they rejoin your server.
Overview
The Role Persistence system automatically snapshots a member's roles when they leave the server and restores them if they rejoin. This is useful for:
- Maintaining staff or VIP roles for members who leave temporarily
- Preventing people from loosing channels they're subscribed to
- Giving xp-based roles back to members
Configuration
Only roles explicitly added to the Persistent Roles list will be restored. This ensures sensitive or temporary roles aren't accidentally reassigned.
persistentroles add
Adds a role to the persistence list.
Usage:
/persistentroles add [role]
Example:
/persistentroles add @Member
Requirements:
- Bot must have
Manage Rolespermission. - Bot's highest role must be above the role you are adding.
Permissions Required: Manage Roles or configured Admin/Mod role.
persistentroles remove
Removes a role from the persistence list.
Usage:
/persistentroles remove [role]
Example:
/persistentroles remove @Member
Effect:
- The role will no longer be snapshotted or restored for future leave/join events.
- Does not affect users who already have a snapshot of this role in the database.
Permissions Required: Manage Roles or configured Admin/Mod role.
persistentroles list
Lists all roles currently managed by the persistence system.
Usage:
/persistentroles list
Permissions Required: Manage Messages (Moderator) or higher.
How It Works
- On Leave: When a member leaves, Raptor checks their roles. If any of their roles are on the Persistent Roles list, a snapshot is saved to the database.
- On Join: When that member rejoins, Raptor looks for a saved snapshot. If found, it reapplies the roles that are still on the configuration list.
- Manual Override: If a moderator removes a persistent role from a member while they are in the server, and then they leave, the snapshot is updated to reflect they no longer have that role.
Note
Role restoration only happens once upon rejoining. If the roles fail to be assigned (e.g., due to permission changes), you may need to manually assign them.
Web Dashboard Management
You can also manage these settings visually:
- Go to your Web Dashboard.
- Navigate to Core Settings.
- Look for the Role Persistence section under Moderation Settings.
- You can view, add, and remove roles directly from the interface.