for some reason it doesn't want to send buttons, I looked it up online but didn't found help, here's my code:
const { Client, LocalAuth ,MessageMedia, Buttons } = require('whatsapp-web.js');
const client = new Client({
authStrategy: new LocalAuth()
});
client.on('qr', qr => {
qrcode.generate(qr, {small: true});
});
client.on('ready', () => {
console.log('Client is ready!');
});
client.on('message', message => {
console.log('message from', message.from)
if (message.body === "!button") {
let button = new Buttons('Button body',[{body:'bt1'},{body:'bt2'},{body:'bt3'}],'title','footer');
client.sendMessage(message.from, button);
}
});
client.initialize();