WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
4.1k stars 1.38k forks source link

[BUG] I can't send button message #1123

Closed tolgakocadag closed 2 weeks ago

tolgakocadag commented 2 weeks ago

"@whiskeysockets/baileys": "^6.7.9",

                        let buttons = [];
                        req.body.buttons.forEach((button,index) => {
                            buttons.push({ buttonId: "id"+index, buttonText: { displayText: button }, type:1});
                        });

                        result = await spc.whatsapp.sock.sendMessage(`${phoneNumber}@s.whatsapp.net`, {
                            text: message,
                            buttons: buttons,
                            headerType: 1
                        });

            The text content is gone but the buttons are not coming. How can I do it?            
Akkun3704 commented 2 weeks ago

956 button is deprecated