# Kick a member

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

This action block can be used to kick a member from a server that the bot has access to.

{% hint style="warning" %}
The bot must at least have the kick member permission for this block to work and must be above the targeted user.
{% endhint %}

## User ID

This field targets a user ID to be kicked. This can be done by a **user id**, [**user option**](/custom-commands-and-events/options/user-option.md)**, or** [**variable**](/custom-commands-and-events/variables.md). \
Keep in mind the variable has to return a plain user ID with no extra symbols or spaces.

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

## Reason

This is an optional field. In this field you can input a reason why you are kicking a member. 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/FvVs38sZxypFcnB4MlKI" 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/kick-a-member.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.
