upd5
This commit is contained in:
parent
da74d76a7c
commit
5f74c970f3
82
index.js
82
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 });
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user