Skip to main content

/restore-roles

Restore a member's roles from a saved snapshot. When a member leaves or is kicked/banned, Thrella saves a snapshot of their roles and nickname. If the member rejoins within 14 days, a moderator can use this command to re-apply their previous roles.

Required Permission​

The user executing the command must have the Manage Roles permission.

Options​

OptionRequiredDescription
userYesThe member whose roles to restore. Must be a current member of the server.

Behavior​

  1. Snapshot lookup -- The bot checks for a saved role snapshot for this user in your server.
  2. TTL check -- If the snapshot is older than 14 days, it has been automatically cleaned up and the command reports that no snapshot is available.
  3. Membership check -- Verifies the user is currently a member of the server. Roles cannot be restored if the user has not rejoined.
  4. Role application -- The bot applies each saved role, with the following logic:
    • Restored -- Roles that exist in the server and are below the bot's highest role are applied.
    • Already has -- Roles the member already has are skipped.
    • Skipped (above bot) -- Roles that are above the bot's highest role in the hierarchy cannot be applied due to Discord's role hierarchy restrictions.
    • Skipped (deleted) -- Roles that no longer exist in the server are skipped.
  5. Report -- The bot sends an ephemeral summary showing how many roles were restored, already present, or skipped, along with the names of each.
  6. Cleanup -- After a successful restore, the snapshot is deleted so it cannot be applied again.

How Snapshots Work​

Thrella automatically saves a snapshot of a member's roles and nickname when they leave the server or are banned. Snapshots are stored for 14 days and then automatically cleaned up. Only the most recent snapshot per member per server is kept.

When a member with a saved snapshot rejoins, the Member Joined audit log embed includes a Previous Roles field listing their saved roles. This gives moderators visibility into the member's former role set without automatically restoring anything.

Notes​

  • The bot can only restore roles that are below its own highest role in the server's role hierarchy. Roles above the bot role are reported as skipped.
  • Only one snapshot per member per server is stored. If a member leaves multiple times, the most recent snapshot replaces any earlier one.
  • The response is ephemeral (only visible to you).
  • Snapshots are created automatically -- no configuration is required to enable them.