# Setting Up Roles

When a user joins, they are automatically assigned the roles you have configured. It is a simple yet effective way to remove less advanced spam bots from your server without impacting the experience of legitimate users.

GateKeeper **supports auto-role features without having rule screening enabled** — however, we always recommend enabling rule screening on community servers as it provides additional protection against spam bots.

To manage this feature, use the `autorole` command group. The bot requires permission to manage roles and the target role must be lower than the bot highest role.

{% tabs %}
{% tab title="Add Roles" %}

```
/autorole add <role> [invite]
```

Adding roles is quite simple.

Type the command above, select the role you want to assign, and hit enter. The bot will run a couple of checks to ensure it has the correct permissions and then respond with a confirmation message, or explain any issues it found.

If you include an invite code, GateKeeper checks that the invite exists in the server before saving the entry.

We recommend using the list command afterwards to confirm the role has been set up correctly.

**Bonus Roles** ![GateKeeper Plus Feature](https://img.shields.io/badge/GateKeeper%20Plus-5865F2?style=flat)

* You can assign up to **5 roles** per server. **GateKeeper Plus** subscribers get an **additional 10 roles** for a total of 15.

**Invite Specific Roles** ![GateKeeper Plus Feature](https://img.shields.io/badge/GateKeeper%20Plus-5865F2?style=flat)

* **GateKeeper Plus** subscribers can assign different roles depending on which invite link a user joined with. Use the optional `invite` parameter and select from the autocomplete list of your server's active invite codes.
  {% endtab %}

{% tab title="Remove Roles" %}

```
/autorole remove <role> [invite]
```

Removes an auto-assigned role. If the role was tied to a specific invite, pass the same invite code to target that entry. Removing a role deducts it from your total auto-role count.

**Remove All Roles**

```
/autorole removeall
```

Removes all auto-assigned roles for the current server.
{% endtab %}

{% tab title="List Roles" %}

```
/autorole list
```

Lists all configured auto-assigned roles, grouped by invite code. Roles with no invite code assigned are shown under **Roles added to unspecified invites** and apply to all new members regardless of how they joined.

If a role no longer appears in this list, check role order and bot permissions first, then [contact the support server](https://support.gatekeeperbot.net/) if needed.
{% endtab %}
{% endtabs %}


---

# 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.gatekeeperbot.net/rule-screening/add-roles.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.
