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

# Levelling

<Card title="Module: Levelling" icon="ranking-star" horizontal="True">
  Reward your members for being active in your server.
</Card>

## Getting Started

For a **first time setup**, you must execute the `levels on` command for kyos to start tracking xp. After this, you can continue with the rest of this guide and customise the levelling system to your liking.

## Ignoring channels and roles

Ideally, you should ignore channels you do **not** want kyos to give XP gain in, to do this use the following command

<Tip>
  To **no longer** ignore a channel, simply re-run the command.
</Tip>

<CodeGroup>
  ```javascript Syntax theme={null}
  ,levels ignore (channel)
  ```

  ```javascript Example theme={null}
  ,levels ignore #music
  ```
</CodeGroup>

<br />

<Frame>
  <img src="https://mintcdn.com/kyos-c60486ad/AalZmPvrgh2Es8UR/images/levelling/levels-ign.png?fit=max&auto=format&n=AalZmPvrgh2Es8UR&q=85&s=34b0b3f06a69af7cc4b1cba6c8061099" width="332" height="126" data-path="images/levelling/levels-ign.png" />
</Frame>

## Customizing level-up messages

You may customise the **level up** message for your member level ups.

<Warning>You must include the `{old.level}` or `{new.level}` variable in your message!</Warning>

<CodeGroup>
  ```javascript Syntax theme={null}
  ,levels message (text)
  ```

  ```javascript Example theme={null}
  ,levels message {embed}$v{content: Congratulations {user.mention}, you've leveled up the level `{new.level}`!}
  ```
</CodeGroup>

### Set the level-up message location

To set the destination of level-up messages, use the following command.

<Info>
  The **default** destination is the context channel
</Info>

<CodeGroup>
  ```javascript Syntax theme={null}
  ,levels messagemode (dms, channel, off, or current)
  ```

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

<br />

<Frame>
  <img src="https://mintcdn.com/kyos-c60486ad/AalZmPvrgh2Es8UR/images/levelling/levels-msgmode.png?fit=max&auto=format&n=AalZmPvrgh2Es8UR&q=85&s=ba7ea8baf13a5a67bdd3f9fabd5a6442" width="414" height="124" data-path="images/levelling/levels-msgmode.png" />
</Frame>

## Changing a member's level

You may give/remove XP, or force set a member's level.
<Warning>These commands require the **administrator** permission!</Warning>

<CodeGroup>
  ```javascript Syntax theme={null}
  ,setlevel (member) (level)
  ,setxp (member) (xp)
  ```

  ```javascript Example theme={null}
  ,setlevel (user) 100
  ,setxp (user) 50000
  ,setxp (user) -50000
  ```
</CodeGroup>

<br />

<Frame>
  <img src="https://mintcdn.com/kyos-c60486ad/AalZmPvrgh2Es8UR/images/levelling/levels-sl.png?fit=max&auto=format&n=AalZmPvrgh2Es8UR&q=85&s=46b75e79c8be38ff1d63ebffcc1365ad" width="410" height="128" data-path="images/levelling/levels-sl.png" />
</Frame>

## Changing the XP gain multiplier

You may change the rate at which XP is given.

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

  ```javascript Example theme={null}
  ,levels setrate 3
  ```
</CodeGroup>

<br />

<Frame>
  <img src="https://mintcdn.com/kyos-c60486ad/AalZmPvrgh2Es8UR/images/levelling/levels-sr.png?fit=max&auto=format&n=AalZmPvrgh2Es8UR&q=85&s=85d517a3db0b1414de72db9166b284c6" width="298" height="130" data-path="images/levelling/levels-sr.png" />
</Frame>

## Related commands

<AccordionGroup>
  <Accordion title="Viewing a user's level and XP">
    Use the `rank (user)` command to view another member's rank progress.
  </Accordion>

  <Accordion title="Viewing the XP leaderboard">
    To view the users with the highest levels, use the `levels leaderboard` command
  </Accordion>

  <Accordion title="Locking the levelling system">
    If you wish to maintain data, but temporarily disable XP gain entirely, use the `levels lock` command
  </Accordion>

  <Accordion title="Unlocking the levelling system">
    To **unlock** the levelling system, use the `levels unlock` command
  </Accordion>
</AccordionGroup>
