# Invites

URL: https://zerodev.ca/docs/medusa/modules/invites

> Tracks who invited each member, filters fake joins and gives roles at invite milestones.



Invites works out which invite each new member used and credits the person who made it.

## Counting

Each member has four counts: regular, left, fake and bonus. Their total is regular minus left plus bonus.

* A join counts as fake when the account is younger than &#x2A;*Fake Account Age (Days)**. Fake joins never count toward the total.
* A member who leaves and rejoins is also fake unless **Credit Rejoins** is on.
* With **Remove Invite On Leave** on, the inviter loses the invite when the member leaves.
* Joins through the server's vanity URL are tracked with no inviter.

<Callout type="warn">
  Medusa needs the **Manage Server** permission to read invites. Without it, joins are recorded with an unknown inviter.
</Callout>

## Milestone Roles

Give roles when a member's total reaches a number. Each milestone has an **Invites Required** count and a **Reward Role**. **Reward Assignment Mode** decides whether members keep every role they earned (Stack) or only the highest one (Highest).

## Settings

**Invite Settings**

| Setting                 | Default | What it does                                           |
| ----------------------- | ------- | ------------------------------------------------------ |
| Enable Invite Tracking  | On      | Turns tracking on or off.                              |
| Announce Joins          | On      | Posts who invited each new member.                     |
| Announcement Channel    | None    | Where joins are announced.                             |
| Fake Account Age (Days) | 7       | Accounts younger than this are fake. `0` turns it off. |
| Remove Invite On Leave  | On      | Takes the invite away when the member leaves.          |
| Credit Rejoins          | Off     | Counts members who rejoin.                             |

**Invite Milestone Roles**

| Setting                | Default | What it does                                |
| ---------------------- | ------- | ------------------------------------------- |
| Reward Assignment Mode | Stack   | Keep every earned role or only the highest. |
| Announce Milestones    | On      | Posts when a member reaches a milestone.    |
| Milestone Roles        | None    | Invite counts and the role each one gives.  |

## Commands

| Command                           | What it does                                                                                 |
| --------------------------------- | -------------------------------------------------------------------------------------------- |
| `/invites view [user]`            | Show a member's counts.                                                                      |
| `/invites leaderboard`            | Show the top inviters.                                                                       |
| `/invites add <user> <amount>`    | Add bonus invites.                                                                           |
| `/invites remove <user> <amount>` | Remove invites.                                                                              |
| `/invites reset <user>`           | Reset all of a member's counts.                                                              |
| View Invites                      | Right-click a member, then **Apps > View Invites**. Off by default on the **Commands** page. |

Add, remove and reset need &#x2A;*Invites ( Manage )** or Administrator. Totals also show on `/leaderboard`, and the **Invite Events** log records joins, leaves, fake joins, milestones and manual changes.
