# Change a members nickname

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

This action block changes the nickname of a member in a server. You can specify / target a specific user to change the nickname of.

{% hint style="warning" %}
Warning: The bot must have Change Nickname permissions to be able to change a member(s) nickname.
{% endhint %}

## Member

{% tabs %}
{% tab title="User who used the command" %}
If this type is chosen, the bot will change the nickname of whoever executed the command / event or who clicked the [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).
{% endtab %}

{% tab title="User Option" %}
Selecting "user option" will change the nickname of the user selected inside the command from the user option.

### User option

You must have a user option added in the command in order for this field to work.\
Only [user options](/custom-commands-and-events/options/user-option.md) may be used in this field, IDs and [variables](/custom-commands-and-events/variables.md) can be used in [#user-id](#user-id "mention")

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

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

{% tab title="User ID" %}
This selection will change the nickname of the user and it will target a specific user ID or [variable ](/custom-commands-and-events/variables.md)that contains a user ID.

### User ID

This field accepts any plain user ID with no extra symbols or spaces. The ID can be in the form of a [variable ](/custom-commands-and-events/variables.md)as well.

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

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

## New Nickname

This field is the new nickname that you want to change the user’s nickname to. You can use [variables](/custom-commands-and-events/variables.md) and [options](/custom-commands-and-events/options.md) inside this field.

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

## Reason

This is an optional field. In this field you can input a reason why you are changing a members nickname. 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/I8nZcw0g5azQF124VQhD" alt=""><figcaption></figcaption></figure>

## Enable Success/Error Handles

Enable Success / Error Handles to detect success and errors inside of the action block. This allows you to run different actions if something goes wrong with your action. Inside of the handle, there are 2 different paths which are used to detect the outcome of the action. The green path on the bottom left side of the block indicates success, while the red path on the bottom right side of the block indicates error. You may attach action blocks to each side of the handle to get the outcome of your action block.

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

The Success/Error Handles feature includes 3 different error variables you can use to get information on why the action block encountered an error. Check them out [here](/custom-commands-and-events/variables.md#error-variables).

<figure><img src="/files/i83ylvvBSlx8LDGrXqlJ" 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/actions/server-actions/change-a-members-nickname.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.
