# Role Condition

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

This condition checks what role a specific user has and compares whether they have it or not.

## Run Multiple Actions

This option allows you to set the condition to run multiple actions at the same time. This means if multiple conditions are met, then each true condition will be run simultaneously. When disabled, only the first met condition will be executed.

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

## User Target

This field is where you choose one of 3 user targets you would like the condition to check the roles of.

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

{% tabs %}
{% tab title="User who used the command" %}
This type of target will check the roles of the user who triggered the command / event or clicked a [button](/custom-commands-and-events/actions/legacy-reply-actions/send-a-message-with-attached-buttons/buttons.md) / [menu option](/custom-commands-and-events/actions/legacy-reply-actions/send-a-message-with-a-select-menu/menu-option.md).&#x20;
{% endtab %}

{% tab title="User Option" %}
The user option target will check the roles of a user selected from the command's [user option.](/custom-commands-and-events/options/user-option.md)&#x20;

### User Option

This field is where you will input the user option variable. Keep in mind this field only accepts [user options](/custom-commands-and-events/options/user-option.md), so you must have one in your command for this field to work.

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

<figure><img src="/files/ukitIQcX3P9Xip4dA4r0" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="User ID" %}
If the user ID option is selected then the condition will check the roles of the user with that ID.

### User ID

This field is where you input a plain user ID or a [variable](/custom-commands-and-events/variables.md) that contains a user ID. Make sure there are no extra symbols or spaces when inputting this.

<figure><img src="/files/bOg5kSunx2mhqWxHKTaX" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Role

This dropdown menu is where you choose the certain role to compare for the condition. You will be able to select a [role option](/custom-commands-and-events/options/role-option.md) as well under the Command Options section of the list as shown in the image. If your role isn't showing, click the refresh icon next to the [#role](#role "mention") title.

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

{% hint style="success" %}
Click the Add Condition block to add the compared role to your builder.
{% endhint %}

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

{% hint style="info" %}
Click the block on the builder to access the following menu.
{% endhint %}

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

## Role ID

In this section you can edit the compared role by switching the role ID. [Variables](/custom-commands-and-events/variables.md) may be used this in field or a plain role ID.

## Run when the user DOES NOT have this role

This option, when enabled, allows you to run the actions below the selected block when the user does not have the role, instead of running when the user has it.

<figure><img src="/files/3lintzfpG1IGvYH5v9cX" alt=""><figcaption></figcaption></figure>

Here is an example layout of the condition:

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


---

# 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/conditions/role-condition.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.
