# Fonctions de la calculatrice

## **Comment envoyer des messages via la calculatrice**

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

La fonction vous aide à envoyer des messages au chat spécifié.

<table><thead><tr><th width="310.76171875">Paramètres</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:$danger;"><strong>!</strong></mark><strong> platform_id</strong></td><td><p><strong>L'ID du chat dans LINE.</strong> </p><p>Vous pouvez transmettre la variable système <a href="/pages/391fc9189a05d7e247197f995bdf040f6d968712"><code>platform_id</code>.</a></p></td></tr><tr><td><strong>text</strong></td><td><p><strong>Texte du message.</strong> </p><p>Un paramètre facultatif si le <code>attachments</code> paramètre est fourni.</p></td></tr><tr><td><strong>buttons</strong></td><td><p><strong>Un tableau de boutons dans le message.</strong></p><p><a href="#an-array-of-buttons-in-the-message">Un paramètre facultatif.</a></p></td></tr><tr><td><strong>attachments</strong></td><td><p><strong>Un tableau de pièces jointes.</strong></p><p><a href="#an-array-of-attachments">Un paramètre facultatif.</a></p></td></tr><tr><td><strong>quote_token</strong></td><td><strong>Jeton de réponse pour répondre à un message spécifique.</strong> Vous pouvez transmettre la variable <code>line_quote_token</code> .</td></tr><tr><td><strong>bot_group_id</strong></td><td><p><strong>ID du groupe du bot.</strong></p><p>Peut être fourni si vous devez envoyer un message au nom d'un autre bot connecté. Un paramètre facultatif.</p></td></tr></tbody></table>

### **Un tableau de boutons dans le message**

Le paramètre buttons est construit de la même manière que les boutons dans le bloc d'entonnoir. Pour simplifier la création du tableau, vous pouvez créer des boutons dans le bloc d'entonnoir à l'aide de l'interface, puis copier les données générées.

Étape 1. Créez des boutons dans le bloc.

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

Étape 2. Copiez les paramètres avancés du bouton.

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

**Exemple de tableau de boutons :**

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

### **Un tableau de pièces jointes**

Le `attachments` paramètre est un tableau de dictionnaires qui définissent les pièces jointes à envoyer.&#x20;

Chaque pièce jointe du tableau doit inclure le type de pièce jointe (`attachment_type`) et son URL (`attachment_url`).

Exemple :

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

Valeurs possibles pour `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/fr/chatbot/messageries/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.
