> For the complete documentation index, see [llms.txt](https://documentation.botghost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.botghost.com/custom-commands-and-events/options/user-option.md).

# User Option

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

The user option block allows for any user to be selected from the server and used later in the commands actions. User IDs may also be used.

<figure><img src="/files/5IwavrstHNfO6oKVyuoT" alt=""><figcaption></figcaption></figure>

You can retrieve the variable of the option via the **Clipboard** or the block itself. The format of the variable is `{option_optionname}`, where `optionname` is the [name](#option-name) of the option.

Additionally, user option variables can be combined with other variables to target the user selected in the option.  `{}` brackets must be excluded from the option when used as a target, like in the example below:

<table><thead><tr><th width="364">❌ Wrong</th><th>☑️ Correct</th></tr></thead><tbody><tr><td><code>{user_name[{option_user}]}</code></td><td><code>{user_name[option_user]}</code></td></tr><tr><td><code>{BGVAR_money[{option_user}]}</code></td><td><code>{BGVAR_money[option_user]}</code></td></tr></tbody></table>

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

## Option Name

This field requires an input for your unique option name. The designated name will then be the reference for your option variable.

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

## Option Description

The option description field allows you to assign a custom description to your option. It is useful to describe what the option is used for.

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

## Set Required

With this switch you are able to toggle if the option should be required or not in order to execute the command.

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


---

# 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 dynamically by asking a question.

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

```
GET https://documentation.botghost.com/custom-commands-and-events/options/user-option.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
