Closed Shaharbad closed 1 year ago
when I tried to send a button it didn't send it for some reason.
it should've sent the button
checkout my code
heres my code: const qrcode = require('qrcode-terminal');
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();
Google Chrome
Standard
Yes, I am using Multi Device
OS: Windows Phone OS: iOS whatsapp-web.js version ^1.17.1
No response
hello i have the same problem how did you answer?
Is there an existing issue for this?
Describe the bug
when I tried to send a button it didn't send it for some reason.
Expected behavior
it should've sent the button
Steps to Reproduce the Bug or Issue
checkout my code
Relevant Code
heres my code: const qrcode = require('qrcode-terminal');
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") {
});
client.initialize();
Browser Type
Google Chrome
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Windows Phone OS: iOS whatsapp-web.js version ^1.17.1
Additional context
No response