Compare commits
No commits in common. "2414e79dceb563e6e96f5a5f1921172e42ed58c9" and "799102c9f1f711762318fe5690b1e6934f5ae227" have entirely different histories.
2414e79dce
...
799102c9f1
57
index.js
57
index.js
@ -125,62 +125,7 @@ app.post('/sendButtons', async (req, res) => {
|
|||||||
const { phone } = req.body;
|
const { phone } = req.body;
|
||||||
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 sendInteractive(sock, `${phone}@s.whatsapp.net`, 'https://placekitten.com/300/200');
|
||||||
text: "Hello World !",
|
|
||||||
footer: "© Fizzxy Dev",
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
buttonId: '.tes',
|
|
||||||
buttonText: {
|
|
||||||
displayText: 'TESTING BOT'
|
|
||||||
},
|
|
||||||
type: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonId: ' ',
|
|
||||||
buttonText: {
|
|
||||||
displayText: 'PRIVATE SCRIPT'
|
|
||||||
},
|
|
||||||
type: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
buttonId: 'action',
|
|
||||||
buttonText: {
|
|
||||||
displayText: 'ini pesan interactiveMeta'
|
|
||||||
},
|
|
||||||
type: 4,
|
|
||||||
nativeFlowInfo: {
|
|
||||||
name: 'single_select',
|
|
||||||
paramsJson: JSON.stringify({
|
|
||||||
title: 'message',
|
|
||||||
sections: [
|
|
||||||
{
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
headerType: 1,
|
|
||||||
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