upd2
This commit is contained in:
parent
2b07bfd426
commit
2414e79dce
79
index.js
79
index.js
@ -122,21 +122,70 @@ app.post('/sendText', async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.post('/sendButtons', async (req, res) => {
|
app.post('/sendButtons', async (req, res) => {
|
||||||
sock.sendMessage(jid, {
|
const { phone } = req.body;
|
||||||
text: "Hello World !",
|
if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' });
|
||||||
footer: "Fizzxy - 2025",
|
try {
|
||||||
buttons: [
|
await sock.sendMessage(`${phone}@s.whatsapp.net`, {
|
||||||
{
|
text: "Hello World !",
|
||||||
buttonId: `🚀`,
|
footer: "© Fizzxy Dev",
|
||||||
buttonText: {
|
buttons: [
|
||||||
displayText: '🗿'
|
{
|
||||||
},
|
buttonId: '.tes',
|
||||||
type: 1
|
buttonText: {
|
||||||
}
|
displayText: 'TESTING BOT'
|
||||||
],
|
},
|
||||||
headerType: 1,
|
type: 1
|
||||||
viewOnce: true
|
},
|
||||||
},{ quoted: null })
|
{
|
||||||
|
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 });
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
res.status(500).json({ error: e.message });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(3001, () => console.log('🚀 Serveur Baileys démarré sur http://localhost:3001'));
|
app.listen(3001, () => console.log('🚀 Serveur Baileys démarré sur http://localhost:3001'));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user