upd3
This commit is contained in:
parent
2414e79dce
commit
563760f812
49
index.js
49
index.js
@ -126,53 +126,21 @@ app.post('/sendButtons', async (req, res) => {
|
|||||||
if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' });
|
if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' });
|
||||||
try {
|
try {
|
||||||
await sock.sendMessage(`${phone}@s.whatsapp.net`, {
|
await sock.sendMessage(`${phone}@s.whatsapp.net`, {
|
||||||
text: "Hello World !",
|
text: "Découvre nos services",
|
||||||
footer: "© Fizzxy Dev",
|
footer: "Powered by Fizzxy",
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
buttonId: '.tes',
|
buttonId: "visit_site",
|
||||||
buttonText: {
|
buttonText: {
|
||||||
displayText: 'TESTING BOT'
|
displayText: "🌐 Visiter le site"
|
||||||
},
|
|
||||||
type: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonId: ' ',
|
|
||||||
buttonText: {
|
|
||||||
displayText: 'PRIVATE SCRIPT'
|
|
||||||
},
|
|
||||||
type: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonId: 'action',
|
|
||||||
buttonText: {
|
|
||||||
displayText: 'ini pesan interactiveMeta'
|
|
||||||
},
|
},
|
||||||
type: 4,
|
type: 4,
|
||||||
nativeFlowInfo: {
|
nativeFlowInfo: {
|
||||||
name: 'single_select',
|
name: "ctl_url",
|
||||||
paramsJson: JSON.stringify({
|
paramsJson: JSON.stringify({
|
||||||
title: 'message',
|
display_text: "🌐 Visiter le site",
|
||||||
sections: [
|
url: "https://canguidev.fr",
|
||||||
{
|
merchant_url: "https://canguidev.fr"
|
||||||
title: 'FizzxyDev - 2025',
|
|
||||||
highlight_label: '😜',
|
|
||||||
rows: [
|
|
||||||
{
|
|
||||||
header: 'HEADER 1',
|
|
||||||
title: 'TITLE 1',
|
|
||||||
description: 'DESCRIPTION 1',
|
|
||||||
id: 'id_1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: 'HEADER 2',
|
|
||||||
title: 'TITLE 2',
|
|
||||||
description: 'DESCRIPTION 2',
|
|
||||||
id: 'id_2'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,6 +149,7 @@ app.post('/sendButtons', async (req, res) => {
|
|||||||
viewOnce: true
|
viewOnce: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
res.json({ success: true });
|
res.json({ success: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user