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

# Invites

> Track who invited members to your server, assign role rewards, and view invite leaderboards.

# Invites

> Track who invited members to your server, assign role rewards, and view invite leaderboards.

## Overview

The invite tracker monitors invite usage and attributes joins to the correct inviter. It counts regular invites, rejoins, fake invites (new accounts below your threshold), and leaves.

## Enable & Disable

```bash theme={null} theme={null}
;invites enable
;invites disable
```

## Check Invites

View invite stats for yourself or another member.

```bash theme={null} theme={null}
;invites (@member)
```

| Field  | Description                                    |
| ------ | ---------------------------------------------- |
| Total  | `regular + bonus − leaves`                     |
| Rejoin | Member left and rejoined using the same invite |
| Fake   | Account younger than the fake threshold        |
| Leaves | Members who left after joining via this invite |

## Log Channel

Set the channel where invite notifications are posted.

<Accordion title="Log channel">
  <CodeGroup>
    ```bash Syntax theme={null} theme={null}
    ;invites logs (#channel)
    ```

    ```bash Example theme={null} theme={null}
    ;invites logs #invite-logs
    ```
  </CodeGroup>
</Accordion>

## Fake Threshold

Flag invites from accounts younger than a specified number of days as fake.

<Accordion title="Fake threshold">
  <CodeGroup>
    ```bash Syntax theme={null} theme={null}
    ;invites fake-threshold (days)
    ```

    ```bash Example theme={null} theme={null}
    ;invites fake-threshold 7
    ```
  </CodeGroup>
</Accordion>

## Invite Message

Customize the message sent when someone joins via an invite.

<Accordion title="Set message">
  <CodeGroup>
    ```bash Syntax theme={null} theme={null}
    ;invites message (text)
    ```

    ```bash Example theme={null} theme={null}
    ;invites message {member.mention} was invited by {inviter.name} who now has {invites} invites!
    ```
  </CodeGroup>

  <Tip>
    ### Want to send an embed instead?

    Use the full embed scripting syntax to build rich messages with titles, colors, images, and more. See [Embed Scripting](/resources/scripting/embeds) to get started.
  </Tip>
</Accordion>

## Rewards

Assign roles automatically when a member reaches an invite count milestone.

<Accordion title="Manage rewards">
  <CodeGroup>
    ```bash Syntax theme={null} theme={null}
    ;invites rewards add (count) (@role)
        ;invites rewards remove (count)
        ;invites rewards list
        ;invites rewards stack (true/false)
        ;invites rewards sync
    ```

    ```bash Example theme={null} theme={null}
    ;invites rewards add 5 @Active Inviter
        ;invites rewards add 25 @Top Inviter
        ;invites rewards stack false
        ;invites rewards sync
    ```
  </CodeGroup>
</Accordion>

**Stack mode** controls whether all earned reward roles are kept (`true`) or only the highest one (`false`).

## Bonus Invites

Manually add or remove bonus invites for a member.

<Accordion title="Bonus invites">
  <CodeGroup>
    ```bash Syntax theme={null} theme={null}
    ;invites bonus add (@member) (amount)
        ;invites bonus remove (@member) (amount)
    ```

    ```bash Example theme={null} theme={null}
    ;invites bonus add @sovereign 10
        ;invites bonus remove @sovereign 5
    ```
  </CodeGroup>
</Accordion>

## Lookup

```bash theme={null} theme={null}
;invites code (@member)
;invites invited (@member)
;invites inviter (@member)
;invites leaderboard
```

| Command       | Description                           |
| ------------- | ------------------------------------- |
| `code`        | List active invite codes for a member |
| `invited`     | Show who a member has invited         |
| `inviter`     | Show who invited a specific member    |
| `leaderboard` | Server-wide invite leaderboard        |
