# Funções da calculadora

## **Como enviar mensagens via a calculadora**

```
line_send_message(platform_id, text, buttons, attachments, quote_token, bot_group_id)
```

A função ajuda você a enviar mensagens para o chat especificado.

<table><thead><tr><th width="310.76171875">Parâmetros</th><th>Descrição</th></tr></thead><tbody><tr><td><mark style="color:$danger;"><strong>!</strong></mark><strong> platform_id</strong></td><td><p><strong>O ID do chat no LINE.</strong> </p><p>Você pode passar a variável do sistema <a href="/pages/6cd1989bdd6b68c42e476f9d5d656373d2f6cd9a"><code>platform_id</code>.</a></p></td></tr><tr><td><strong>text</strong></td><td><p><strong>Texto da mensagem.</strong> </p><p>Um parâmetro opcional se o <code>attachments</code> parâmetro for fornecido.</p></td></tr><tr><td><strong>buttons</strong></td><td><p><strong>Um array de botões na mensagem.</strong></p><p><a href="#an-array-of-buttons-in-the-message">Um parâmetro opcional.</a></p></td></tr><tr><td><strong>attachments</strong></td><td><p><strong>Um array de anexos.</strong></p><p><a href="#an-array-of-attachments">Um parâmetro opcional.</a></p></td></tr><tr><td><strong>quote_token</strong></td><td><strong>Token de resposta para responder a uma mensagem específica.</strong> Você pode passar a <code>line_quote_token</code> variável.</td></tr><tr><td><strong>bot_group_id</strong></td><td><p><strong>ID do grupo do bot.</strong></p><p>Pode ser fornecido se você precisar enviar uma mensagem em nome de outro bot conectado. Um parâmetro opcional.</p></td></tr></tbody></table>

### **Um array de botões na mensagem**

O parâmetro buttons é formado da mesma forma que os botões no bloco de funil. Para simplificar a criação do array, você pode criar botões no bloco de funil usando a interface e copiar os dados gerados.

Etapa 1. Crie botões no bloco.

<div data-with-frame="true"><figure><img src="/files/ad3adcb725075da2e082aae89fdcec5bb3216dac" alt=""><figcaption></figcaption></figure></div>

Etapa 2. Copie as configurações avançadas do botão.

<div data-with-frame="true"><figure><img src="/files/1622edd928181552d989cfb734680ef39ed9dd3a" alt=""><figcaption></figcaption></figure></div>

**Exemplo de um array de botões:**

`[{"line":0,"index_in_line":0,"text":"Visitar site","type":"inline","url":"`[`https://google.com","callback_link":false`](about:blank)`}]`

### **Um array de anexos**

O `attachments` parâmetro é um array de dicionários que definem os anexos a serem enviados.&#x20;

Cada anexo no array deve incluir o tipo de anexo (`attachment_type`) e sua URL (`attachment_url`).

Exemplo:

attach\_list = \[{"attachment\_type": "image", "attachment\_url": "[https://files.site.com/my\_image.jpg](https://files.mavibot.ai/uploads/message_files/ca31b6d2ff3c2eef9c86bb0cc820412057b0ca004bd6c0e402c8df793c42f17d.jpg)"}]

Valores possíveis para `attachment_type`:

* image
* video
* audio


---

# 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.mavibot.ai/doc/pt/chatbot/mensageiros/line_chatbot/api.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.
