# Permissions

InviteCount requires specific permissions to function correctly. Below is a breakdown of each permission and what it's used for.

## Required Permissions

| Permission             | What It's Used For                                                                                                                                      |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Manage Server`        | Read the server's active invite codes so InviteCount can track them                                                                                     |
| `Manage Channels`      | Detect when invites are created or deleted in channels                                                                                                  |
| `Manage Roles`         | Assign [autoroles](https://docs.invite-count.xyz/commands/configuration#autoroles) and [rank rewards](https://docs.invite-count.xyz/features/levelling) |
| `Send Messages`        | Send welcome, leave, giveaway, leaderboard, and level-up messages                                                                                       |
| `Read Message History` | Edit existing messages such as pinned leaderboards and giveaway embeds                                                                                  |
| `Use External Emojis`  | Display custom emojis in InviteCount's responses                                                                                                        |
| `Attach Files`         | Send graph images (`/graph joins`, `/graph leaves`) and CSV exports                                                                                     |

## Optional Permissions

| Permission        | When It's Needed                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| `Manage Messages` | Only for [pinned leaderboards](https://docs.invite-count.xyz/features/leaderboards) (pin messages)     |
| `Add Reactions`   | Only for [giveaways](https://docs.invite-count.xyz/commands/giveaways) (reaction-based type)           |
| `Ban Members`     | Only for [verification](https://docs.invite-count.xyz/features/verification) system with `ban` action  |
| `Kick Members`    | Only for [verification](https://docs.invite-count.xyz/features/verification) system with `kick` action |

## Checking Permissions

Run the following command at any time to verify that InviteCount has everything it needs:

```
/permscheck
```

{% hint style="danger" %}
If the bot is missing **Manage Server** or **Manage Channels**, invite tracking **will not work**. The bot will warn you when you run `/invites`.
{% endhint %}

## Role Hierarchy

For InviteCount to assign roles (autoroles, rank rewards, verification roles), the bot's role must be **above** the target role in your server's role list.

Go to **Server Settings → Roles** and drag the InviteCount role above any roles you want it to manage.
