# Remove Roles from All Users

<figure><img src="/files/9bept4MJDEEfLIrnzxX5" alt=""><figcaption></figcaption></figure>

Remove a role from all members of a server. You can specify role IDs and users affected in specific ways.

{% hint style="warning" %}
The bot must have the Manage Roles permission and a higher position than the role your trying to remove via the bot.
{% endhint %}

## Roles Selector

Click the "+" icon to select the server roles you want to remove from all users.&#x20;

<figure><img src="/files/JqlvCF9SAEbAgrnf3FuV" alt=""><figcaption></figcaption></figure>

## **Additional Roles**

In this field you can add additional roles in the form of plain role IDs only. This field is commonly used to add specific role IDs / [variables](/custom-commands-and-events/variables.md). As the field description states, each role ID or variable must be separated by a comma.

<figure><img src="/files/BIg57pIlsMinhYPoPmee" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/FCNTmlunFJ0yR4GHqVeP" alt=""><figcaption></figcaption></figure>

## Reason

This is an optional field. In this field you can input a reason why you are removing a role from everyone in the server. This reason will be shown in your server's audit log. [Variables](/custom-commands-and-events/variables.md) can also be used in this field.

<figure><img src="/files/QRclTbpDPfgz2jUjbxqx" alt=""><figcaption></figcaption></figure>

## Server ID

In this optional field you can enter the ID of a server that you want to run the action in. This way, you can target servers without triggering a command or event in there. [Variables](/custom-commands-and-events/variables.md) can also be used in this field.&#x20;

<figure><img src="/files/ikXCe7Cv1sgODtB0OzMK" alt=""><figcaption></figcaption></figure>

## Bot Filtering

In this selection menu you can enter whether or not you want the bot to ignore other bots, meaning the role will not be removed from bots in your server.&#x20;

<figure><img src="/files/CK7UxlAH0mIIcjlVv0LN" alt=""><figcaption></figcaption></figure>

## Remove all Roles

You can enable this section if you wish the bot to remove all roles from all users in a server. This will ignore all settings above.&#x20;

<figure><img src="/files/7z8ti0hePWKbMcjjYGsP" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
This action will remove the selected roles from ALL users in the server. This operation cannot be undone and may take time for large servers. Use with caution.
{% endhint %}


---

# 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://documentation.botghost.com/custom-commands-and-events/actions/role-actions/remove-roles-from-all-users.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.
