# Виджет Discord канала

## Получение настроек

<mark style="color:blue;">`GET`</mark> `https://easydonate.ru/api/v3/plugin/Discord.Widget/getSettings`

Запрос вернет настройки плагина.

#### Headers

| Name                                       | Type   | Description              |
| ------------------------------------------ | ------ | ------------------------ |
| Shop-Key<mark style="color:red;">\*</mark> | string | Уникальный ключ магазина |

{% tabs %}
{% tab title="200: OK Запрос успешно обработан" %}

```
{
   "success": true,
   "response": {
      "enabled": true,
      "channelId": "479214992730751008",
      "width": "100%",
      "height": "300px",
      "theme": "dark"
   }
}
```

{% endtab %}

{% tab title="400: Bad Request Ошибка" %}

```
{
   "success": false,
   "error_code": 5,
   "response": "Плагин неактивен."
}
```

{% endtab %}
{% endtabs %}

## Получение виджета

<mark style="color:blue;">`GET`</mark> `https://easydonate.ru/api/v3/plugin/Discord.Widget/getEmbed`

Запрос вернет сгенерированный на основе настроек плагина виджет в виде HTML кода.

#### Headers

| Name                                       | Type   | Description              |
| ------------------------------------------ | ------ | ------------------------ |
| Shop-Key<mark style="color:red;">\*</mark> | string | Уникальный ключ магазина |

{% tabs %}
{% tab title="200: OK Запрос успешно обработан" %}

```
{
   "success": true,
   "response": "<iframe sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" src="https"://discordapp.com/widget?id=479214992730751008&theme=dark" width="100%" height="300px" allowtransparency="true" frameborder="0"></iframe>"
}
```

{% endtab %}

{% tab title="400: Bad Request Ошибка" %}

```
{
   "success": false,
   "error_code": 5,
   "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.easydonate.ru/plugin/discord.widget.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.
