Closed AndisKush closed 1 year ago
Thank you for joining our community, happy. We are currently fixing this bug, our new version will be released soon.
Working with Love!
This issue is stale because it has been open for 30 days with no activity.
Hello, i'm having the same problem
the function doesn't return an error, I receive the notification but I don't received the message. After calling the button function, the chat messages disappear, and I can't see any new messages sent to that chat.
I tested multidevice: true/false with both, business and personal account.
Environment
screenshots
chat before send the button:
notification received after sending the button:
chat after sending button:
i'm using the documentation code:
const buttons = [{ "buttonText": { "displayText": "Text of Button 1" }}, { "buttonText": { "displayText": "Text of Button 2" }}]
await client.sendButtons('xxxxxxxxxxxx@c.us', 'title', buttons, 'description')
.then((result) => { console.log('Result: ', result); //return object success })
.catch((erro) => { console.error('Error when sending: ', erro); //return object error });
Result: { me: {}, to: { fromMe: true, remote: { server: 'c.us', user: 'xxxxxxxxxxxx', _serialized: 'xxxxxxxxxxxx@c.us' }, id: 'XXXXXXXXXXXXXXXXXXXX', _serialized: 'true_xxxxxxxxxxxx@c.us_XXXXXXXXXXXXXXXXXXXX' }, erro: false, text: null, status: 'OK', result: null, type: 'Buttons', dynamicReplyButtons: [ { buttonText: [Object] }, { buttonText: [Object] } ] }
Same problem here!
The solution is simple, the example is wrong. It should look like this:
[
{
url: 'https://orkestral.io/',
text: 'Orkestral Cloud'
}, {
phoneNumber: '+55 11 91438-0641',
text: 'Suporte Orkestral'
}, {
id: '1',
text: 'Button 1'
}
]
But it's still wrong because alone, the 'text' attribute works, the rest doesn't work
The solution is simple, the example is wrong. It should look like this:
[ { url: 'https://orkestral.io/', text: 'Orkestral Cloud' }, { phoneNumber: '+55 11 91438-0641', text: 'Suporte Orkestral' }, { id: '1', text: 'Button 1' } ]
But it's still wrong because alone, the 'text' attribute works, the rest doesn't work
it works out for me, at least the buttons are showing 👍
The solution is simple, the example is wrong. It should look like this:
[ { url: 'https://orkestral.io/', text: 'Orkestral Cloud' }, { phoneNumber: '+55 11 91438-0641', text: 'Suporte Orkestral' }, { id: '1', text: 'Button 1' } ]
But it's still wrong because alone, the 'text' attribute works, the rest doesn't work
It doesn't work for me, can you show the code please?? Whatsapp business??
let buttons = [
{
url: 'https://orkestral.io/',
text: 'Prueba de link'
}, {
phoneNumber: '+55 11 91438-0641',
text: 'Suporte Orkestral'
}, {
id: '1',
text: 'Button 1'
}
];
client.sendButtons("xxxxxxxxxxxx@c.us", "Title", buttons, "Description")
You can try this: let buttons = [ { "id": "1", "text": "Text 1", },
{
"id": "2",
"text": "Text 2",
},
];
This format is working in 4.3.7 version
Sorry
let buttons = [ { url: 'https://orkestral.io/', text: 'Prueba de link' }, { phoneNumber: '+55 11 91438-0641', text: 'Suporte Orkestral' }, { id: '1', text: 'Button 1' } ]; client.sendButtons("xxxxxxxxxxxx@c.us", "Title", buttons, "Description")
It doesn't work here 4.3.7,
let buttons = [
{
url: 'https://orkestral.io/',
text: 'Prueba de link'
}, {
phoneNumber: '+55 11 91438-0641',
text: 'Suporte Orkestral'
}, {
id: '1',
text: 'Button 1'
}
]
client.sendButtons(numberMarlon, 'Title', buttons, 'Description')
.then((result) => {
console.log('Result: ', result); //return object success
})
.catch((erro) => {
console.error('Error when sending: ', erro); //return object error
});
Whtas that was sent
Whats that was recived
I am the facing the same issue being faced by @marlon33.
The sendButton method is working only for São Paulo (SP) DDD numbers for me.
// São Paulo DDD number
const spNumber = 5511XXXXXXXXX@c.us // sendButton working for sender and receiver
But when I change the phone number to another Brazilian DDD like GO/RS/PA/MA ... doesn't work. The messages are sent but the WhatsApp sends to the same number but not Whatsapp. When I try to call the number I receive the respective message: "This number doesn't have WhatsApp"
The sender's perspective (With number):
But the real conversation is (With contact name):
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Any solutions to this issue?
Description
Usando o código da documentação
const buttons = [ { "buttonText": { "displayText": "Text of Button 1" } }, { "buttonText": { "displayText": "Text of Button 2" } } ] await client.sendButtons('000000000000@c.us', 'Title', buttons, 'Description') .then((result) => { console.log('Result: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error });
O result:
Result: { me: {}, to: { fromMe: true, remote: { server: 'c.us', user: '553488354011', _serialized: '553488354011@c.us' }, id: '3EB0CCF2210FACEA1D69', _serialized: 'true_553488354011@c.us_3EB0CCF2210FACEA1D69' }, erro: false, text: null, status: 'OK', result: null, type: 'Buttons', dynamicReplyButtons: [ { buttonText: [Object] }, { buttonText: [Object] } ] }
Mas a mensagem não aparece no WhatsApp
Environment
Additional context / Screenshot
Add any other context about the problem here. If applicable, add screenshots to help explain.