> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.petto.sbs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sticky Roles

> Give members their roles back when they leave and rejoin.

## Overview

When sticky roles are on, Petto remembers a member's roles when they leave the server and gives them back if they rejoin within **90 days**. A snapshot older than that is never restored.

Roles managed by an integration (a bot's own role, a booster or subscription role) are not saved, because Discord decides who gets those. Petto also needs its own role to be above the roles it restores, as with any role command ([permissions and hierarchy](/concepts/permissions-and-hierarchy)).

## Commands

<CodeGroup>
  ```javascript Syntax theme={null}
  !stickyroles enable
  !stickyroles disable
  !stickyroles status
  ```

  ```javascript Example theme={null}
  !stickyroles enable
  !stickyroles status
  ```

  ```text Result theme={null}
  ✅ Sticky roles enabled. A member's roles (except managed ones) are saved when they leave, and restored if they rejoin within 90 days.
  ```
</CodeGroup>

It needs **Manage Roles**. `status` shows whether the feature is on.

<Info>
  Sticky roles pair well with [join roles](/onboarding/join-roles): a returning member gets their old roles back, and a brand new member gets the join roles.
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.