> For the complete documentation index, see [llms.txt](https://docs.invitelogger.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.invitelogger.me/general-topics/invite-tracking/required-permissions/permission-to-give-a-role.md). Agents can also search and read this documentation through its [MCP server](https://docs.invitelogger.me/~gitbook/mcp).

# Permission to give a role

Some features of InviteLogger such as the source feature may need to give members a discord role.

To achieve that the bot must:

* Have the manage role permission
* Having its own role above the role that will be given

#### Example of the problem:

{% tabs %}
{% tab title="Role picker" %}

<figure><img src="https://1233429419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MW_7KWGOtXaonSVC9Jd%2Fuploads%2FwRcQPm1a3dB2PBpq8837%2Fimage.png?alt=media&amp;token=1f04fc0d-1243-4c2a-b540-970d42c73c1e" alt="" width="214"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Role order" %}

<figure><img src="https://1233429419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MW_7KWGOtXaonSVC9Jd%2Fuploads%2Fb0rXO4Y2GYhm9QyfOmMy%2Fimage.png?alt=media&amp;token=15ab45f2-6dd5-4d6f-8a73-246c3f33d0bf" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### How to fix:&#x20;

Just find the InviteLogger role and move it above the roles that you want to give.

{% tabs %}
{% tab title="Role picker" %}

<figure><img src="https://1233429419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MW_7KWGOtXaonSVC9Jd%2Fuploads%2F8HgiV6BiVdX9siBdFBxz%2Finvlog_role_order.gif?alt=media&amp;token=8dc26b31-de2e-4fc3-8002-3f7df7a0e752" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Second Tab" %}

<figure><img src="https://1233429419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MW_7KWGOtXaonSVC9Jd%2Fuploads%2Fu6r73J5pQwqfln2QsrB1%2Fimage.png?alt=media&amp;token=1b810a6b-69b7-478f-a7db-9ca561be3f71" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="danger" %}
Always make sure that you're not giving role with sensitive permissions as they may be dangerous for your server
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.invitelogger.me/general-topics/invite-tracking/required-permissions/permission-to-give-a-role.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
