From 5f74c970f3154f895179d64a2d084111a3acd602 Mon Sep 17 00:00:00 2001 From: julien Date: Tue, 6 May 2025 14:02:30 +0200 Subject: [PATCH] upd5 --- index.js | 82 ++++++++------------------------------------------------ 1 file changed, 11 insertions(+), 71 deletions(-) diff --git a/index.js b/index.js index 0c29b91..1d7a9d2 100644 --- a/index.js +++ b/index.js @@ -134,95 +134,35 @@ app.post('/sendButtons', async (req, res) => { deviceListMetadataVersion: 2 }, interactiveMessage: proto.Message.InteractiveMessage.create({ - body: { text: "Fizzxy Dev" }, - footer: { text: "Bot" }, + body: { text: "Bienvenue sur notre service !" }, + footer: { text: "Choisis une action ci-dessous" }, header: { - title: "Igna", - subtitle: "test", + title: "Menu principal", hasMediaAttachment: false }, nativeFlowMessage: { buttons: [ - { - name: "single_select", - buttonParamsJson: JSON.stringify({ - title: "title", - sections: [ - { - title: "menu", - highlight_label: "label", - rows: [ - { - header: "header", - title: "title", - description: "description", - id: "id1" - }, - { - header: "header", - title: "title", - description: "description", - id: "id2" - } - ] - } - ] - }) - }, { name: "cta_reply", buttonParamsJson: JSON.stringify({ - display_text: "quick_reply", - id: "message" + display_text: "📩 Contacter support", + id: "support_action" }) }, { name: "cta_url", buttonParamsJson: JSON.stringify({ - display_text: "Visiter Google", - url: "https://www.google.com", - merchant_url: "https://www.google.com" + display_text: "🌐 Voir notre site", + url: "https://canguidev.fr", + merchant_url: "https://canguidev.fr" }) }, { name: "cta_call", buttonParamsJson: JSON.stringify({ - display_text: "Appeler support", - id: "+33600000000" + display_text: "📞 Appeler le support", + id: "+33612345678" }) - }, - { - name: "cta_copy", - buttonParamsJson: JSON.stringify({ - display_text: "Copier code", - id: "codecopie", - copy_code: "123456789" - }) - }, - { - name: "cta_reminder", - buttonParamsJson: JSON.stringify({ - display_text: "Ajouter rappel", - id: "reminder_id" - }) - }, - { - name: "cta_cancel_reminder", - buttonParamsJson: JSON.stringify({ - display_text: "Annuler rappel", - id: "reminder_id" - }) - }, - { - name: "address_message", - buttonParamsJson: JSON.stringify({ - display_text: "Adresse", - id: "adresse_id" - }) - }, - { - name: "send_location", - buttonParamsJson: "" } ] } @@ -236,7 +176,7 @@ app.post('/sendButtons', async (req, res) => { res.json({ success: true }); } catch (e) { - console.error(e); + console.error('❌ Erreur bouton actif :', e); res.status(500).json({ error: e.message }); } });