# Commands

## Get Commands

<mark style="color:blue;">`GET`</mark> `/bot/:id/commands`

#### Path Parameters

| Name                                 | Type   | Description                                    |
| ------------------------------------ | ------ | ---------------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | It specifies which bot data you will withdraw. |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  voted: true/false
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
 "error": "You entered an invalid bot token."
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Add Command

<mark style="color:green;">`POST`</mark> `/bot/:id/commands`

#### Path Parameters

| Name | Type   | Description                                    |
| ---- | ------ | ---------------------------------------------- |
| id   | String | It specifies which bot data you will withdraw. |

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String |             |

#### Request Body

| Name                                          | Type   | Description            |
| --------------------------------------------- | ------ | ---------------------- |
| name<mark style="color:red;">\*</mark>        | String | Name of command        |
| description<mark style="color:red;">\*</mark> | String | Description of command |
| syntax<mark style="color:red;">\*</mark>      | String | Usage of command       |
| category                                      | String | Category of command    |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Edit Command

<mark style="color:green;">`POST`</mark> `/bot/:id/commands`

#### Path Parameters

| Name | Type   | Description                                    |
| ---- | ------ | ---------------------------------------------- |
| id   | String | It specifies which bot data you will withdraw. |

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String |             |

#### Request Body

| Name                                          | Type   | Description            |
| --------------------------------------------- | ------ | ---------------------- |
| id<mark style="color:red;">\*</mark>          | String | ID of command          |
| category                                      | String | Category of command    |
| name<mark style="color:red;">\*</mark>        | String | Name of command        |
| description<mark style="color:red;">\*</mark> | String | Description of command |
| syntax<mark style="color:red;">\*</mark>      | String | Usage of command       |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Delete Command

<mark style="color:red;">`DELETE`</mark> `/bot/:id/commands/:commandId`

#### Path Parameters

| Name      | Type   | Description                                    |
| --------- | ------ | ---------------------------------------------- |
| id        | String | It specifies which bot data you will withdraw. |
| commandId | String |                                                |

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="403: Forbidden " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.vcodes.xyz/resources/search/commands.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.
