From c0c1d67cf4ba62e806323515afb93c485072ccbf Mon Sep 17 00:00:00 2001 From: julien Date: Tue, 6 May 2025 12:27:01 +0200 Subject: [PATCH] test --- index.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0d9c0e3..52dfa33 100644 --- a/index.js +++ b/index.js @@ -73,8 +73,19 @@ app.post('/sendButtons', async (req, res) => { if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' }); try { const btnMsg = { - text: message, - buttons: buttons.map((b, i) => ({ buttonId: `btn_${i}`, buttonText: { displayText: b }, type: 1 })), + text: 'Choisis une option :', + buttons: [ + { + buttonId: 'produits', + buttonText: { displayText: 'Voir produits' }, + type: 1 + }, + { + buttonId: 'support', + buttonText: { displayText: 'Contacter support' }, + type: 1 + } + ], headerType: 1 }; console.log(btnMsg);