# 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](/commands/configuration.md#autoroles) and [rank rewards](/features/levelling.md) |
| `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](/features/leaderboards.md) (pin messages)     |
| `Add Reactions`   | Only for [giveaways](/commands/giveaways.md) (reaction-based type)           |
| `Ban Members`     | Only for [verification](/features/verification.md) system with `ban` action  |
| `Kick Members`    | Only for [verification](/features/verification.md) 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.invite-count.xyz/getting-started/permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
