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

# Levels

> Reward members with roles and XP for staying active.

## Getting started

XP tracking is off until you turn it on. Nothing else on this page has any effect until you do.

```javascript theme={null}
,level unlock
```

Run `,level lock` to pause tracking without losing anyone's progress.

## Ignoring channels and roles

Do this before members start earning. Any channel or role on the ignore list earns nothing.

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level ignore add (channel or role)
  ```

  ```javascript Example theme={null}
  ,level ignore add #spam
  ,level ignore add @Muted
  ```
</CodeGroup>

| Command                                  | What it does                                |
| ---------------------------------------- | ------------------------------------------- |
| `,level ignore remove (channel or role)` | Take something back off the list            |
| `,level ignore list`                     | See everything currently ignored            |
| `,level ignore reset`                    | Clear the list behind a confirmation prompt |

## Reward roles

Assign a role to a level and members receive it when they get there.

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level add (role) (level)
  ```

  ```javascript Example theme={null}
  ,level add @Level5 5
  ```
</CodeGroup>

<Info>
  Levels run from **1** to **100**. `,level update` behaves identically to `add` — use whichever reads better.
</Info>

Remove a reward by its level, not its role:

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level remove (level)
  ```

  ```javascript Example theme={null}
  ,level remove 5
  ```
</CodeGroup>

### Stacking

With stacking on, members keep every role they've earned along the way. With it off, they only hold the role for their current tier.

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level stackroles (yes or no)
  ```

  ```javascript Example theme={null}
  ,level stackroles no
  ```
</CodeGroup>

### Backfilling existing members

If your server already had XP before you set up rewards, `,level sync` walks every member and applies the roles their current level entitles them to.

<Tip>
  Run this after adding a new reward role so existing members at that level pick it up immediately.
</Tip>

## Level-up messages

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level message (text or embed code)
  ```

  ```javascript Example theme={null}
  ,level message congrats {user.mention} on hitting level {level.new_rank}!
  ```
</CodeGroup>

Full embed syntax works — start with `{embed}` for a rich embed. See [Embed Scripting](/resources/scripting).

`,level message view` shows what's currently set.

### Where it posts

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level messagemode (mode)
  ```

  ```javascript Example theme={null}
  ,level messagemode #level-up
  ```
</CodeGroup>

| Mode       | Behavior                                                |
| ---------- | ------------------------------------------------------- |
| `#channel` | Posts to that specific channel                          |
| `context`  | Posts wherever the member was chatting                  |
| `pm`       | Sends a DM instead — `dm` also works                    |
| `none`     | Turns level-up messages off entirely — `off` also works |

<Warning>
  If you use `pm`, include `{guild.name}` in your message. Otherwise members get a DM with no indication which server it came from.
</Warning>

## XP rate

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level setrate (multiplier)
  ```

  ```javascript Example theme={null}
  ,level setrate 5.5
  ```
</CodeGroup>

<Info>
  Must be between **0.1** and **10**.
</Info>

## Viewing progress

Running `,level` on its own generates a rank card showing your avatar, level, total XP, and a progress bar toward the next level. Add a member to see theirs:

```javascript theme={null}
,level financely
```

<Frame>
  <img src="https://mintcdn.com/confine/2973i9UGCY1FmSy5/images/Screenshot-2026-08-17-122739.png?fit=max&auto=format&n=2973i9UGCY1FmSy5&q=85&s=00be58b43deaa1fce607be8c9b14f438" alt="Screenshot 2026 08 17 122739" width="605" height="252" data-path="images/Screenshot-2026-08-17-122739.png" />
</Frame>

`,level leaderboard` ranks the top 50 earners. you can also rename the leaderboard heading:

<CodeGroup>
  ```javascript Syntax theme={null}
  ,level leaderboard rename (text)
  ```

  ```javascript Example theme={null}
  ,level leaderboard rename confine XP Leaderboard
  ```
</CodeGroup>

## Admin tools

<AccordionGroup>
  <Accordion title="Checking your configuration">
    `,level config` shows whether tracking is on, your XP rate, message mode and channel, stacking setting, and how many rewards and ignores are configured.
  </Accordion>

  <Accordion title="Listing everyone with XP">
    `,level list` pages through every member who has earned XP, with their level and total.
  </Accordion>

  <Accordion title="Wiping all XP">
    `,level reset` clears every member's XP and levels. Confirmation prompt first — buttons only respond to whoever ran it, and expire after 30 seconds.
  </Accordion>

  <Accordion title="Removing data for members who left">
    `,level cleanup` drops level data for anyone no longer in the server, leaving current members untouched.

    <Warning>
      Server owner only.
    </Warning>
  </Accordion>
</AccordionGroup>
