# 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 %}
