Closed Ayperoz closed 1 year ago
Use the experimental branch
npm install github:pedroslopez/whatsapp-web.js#fix-buttons-list
Usar la rama experimental
npm install github:pedroslopez/whatsapp-web.js#fix-buttons-list
same fails to install this
Usar la rama experimental
npm install github:pedroslopez/whatsapp-web.js#fix-buttons-list
same fails to install this
npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list
npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list
same mistake
Try updating npm, I fixed that bug with version 1.18.2 and buttons are sent
Try updating npm, I fixed that bug with version 1.18.2 and buttons are sent
update and...
same
I already had version 1.18.2
when i send "Hello" show me this
@Ayperoz install git
fixed, step 1 install Git Bash. step 2 run npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list from Git Bash in the project directory. step 3 - run project
And the buttons work
i can run button/list using this step:
button can use this version but normal chat without button error
const templateButtons = buttons.filter(button => button.url || button.number).slice(0,3);
TypeError: buttons.filter is not a function
How do I make sure that when I select a button the others are disabled?
does this have to use WhatsApp business?
¿Esto tiene que usar WhatsApp Business?
Yes, same detail as the description, Whatsapp business. android, multi device, chrome browser :D
@PurpShell Please rebase / merge your branch on latest main. It seems the LegacyPhoneFeatures
thing is breaking the fix-buttons-list
branch right now
I did npm i github:pedroslopez/whatsapp-web.js#fix-buttons-list, and show this error:
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'LegacyPhoneFeatures')
@matheuspbmarques I got the same error. are there any solutions?
@skibaalex , anything.
Guys, I'm not getting any errors while sending the button, but I cannot receive the button on the receiver side.
@matheuspbmarques I got the same error. are there any solutions?
Solution of problem are in other issue. Follow link:
https://github.com/pedroslopez/whatsapp-web.js/issues/1945#issuecomment-1400246316
Resolved for me.
Guys, I'm not getting any errors while sending the button, but I cannot receive the button on the receiver side.
Follow: https://github.com/pedroslopez/whatsapp-web.js/issues/1759#issuecomment-1403722722
npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list
to fix this I had to make a temporary fix that I got from the discord group.
Pelo oq ue eu li, foi por causa de uma atualização do wpp web (12/01/2023)
Go into file -> node_modules
enter the file -> whatsapp-web.js/src/util/Injected.js
and do like in this picture, this worked for me!
It's not working even in version 1.19.4, already with the Branch modification in Message.js line 497.
From Tuesday this week the buttons stopped working, I didn't make any changes in the code, does anyone have a solution? I tried to update to the latest version and it still doesn't work.
Personally I changed my script to use the normal bot, because whatsapp detected the buttons almost automatically as an unauthorized version of whatsapp and blocked the line in a matter of minutes, I currently have ticket #1759 open with the solution I found in your moment but it no longer applies to the current version, I recommend, as a person who uses wha-js to send mass messages, not to use it until further notice. Greetings!
The option of deleting a message also stopped working, it gives me this error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'promises')
בתאריך שבת, 25 במרץ 2023 ב-6:04 מאת leandro-giar < @.***>:
Personally I changed my script to use the normal bot, because whatsapp detected the buttons almost automatically as an unauthorized version of whatsapp and blocked the line in a matter of minutes, I currently have ticket #1759 https://github.com/pedroslopez/whatsapp-web.js/issues/1759 open with the solution I found in your moment but it no longer applies to the current version, I recommend, as a person who uses wha-js to send mass messages, not to use it until further notice. Greetings!
— Reply to this email directly, view it on GitHub https://github.com/pedroslopez/whatsapp-web.js/issues/1759#issuecomment-1483698051, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLDS2ERFTQNQI6DDTJSEJDW5ZOD3ANCNFSM6AAAAAARPCOSPI . You are receiving this because you commented.Message ID: @.***>
const { Client, LocalAuth, MessageMedia, Buttons } = require('whatsapp-web.js');
const qrcode = require('qrcode-terminal')
const client = new Client({ authStrategy: new LocalAuth(), });
client.on('qr', (qr) => { qrcode.generate(qr, { small: true }) });
client.on('authenticated', () => { console.log('Authenticated'); });
let chatId = "" client.on('message', message => { console.log(message.body); chatId = message.from; console.log(chatId); });
client.on('message', message => { console.log('message from', message.from) if (message.body === "button") { try { console.log(message.body); let button = new Buttons('Button body', [{ body: 'bt1' }, { body: 'bt2' }, { body: 'bt3' }], 'title', 'footer'); console.log(button); client.sendMessage(chatId, button); } catch (error) { console.log(error); }
}
});
client.on('ready', () => { console.log("Client is ready"); });
client.initialize();
I installed "npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list" I get replies whatsapp web in laptop. I don't see the button in mobile application. I did everthing you mentioned above to get the button list. But nothing is working. pls give me the right solution. pls help.
Hola, today is May 7 and Buttons not work, ¿Do you know what happen? Thanks,
Hola, today is May 7 and Buttons not work, ¿Do you know what happen? Thanks,
At the moment we are still waiting for an update of the package that supports the buttons again, I chose to stop using them and use a conditional in the incoming with numbers, for example option1 option 2 option 3 and from there to verify the message or an error if the option is not valid
Hi, guys.
I fix buttons erro, but not work in current version, I create a zip that buttons work, but not is unofficial, or I can create a whatsapp group and send the file them.
@matheuspbmarques can you send the file here ?
sendMessage doesn't work now (May 17th). can't send any message to clients.
Atualizei, tudo funcionando menos os botões e listas
does it require whatsapp business account to send buttons in chat?
does it require whatsapp business account to send buttons in chat?
no, just have whatsapp
Buttons are going to be deprecated incrementally over the coming versions.
fixed, step 1 install Git Bash. step 2 run npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list from Git Bash in the project directory. step 3 - run project
And the buttons work
can i see reply button message when cliked?? please
I installed fix-buttons-list library on my project, but it is not still working. This is my detailed code.
After update fix-buttons-list library, message.reply() function is also not working.
"node": latest version "whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#fix-buttons-list"
const { Client, MessageMedia, Buttons } = require('whatsapp-web.js');
const client = new Client();
client.on('qr', (qr) => { qrcode.generate(qr, {small: true}); });
client.on('ready', () => { console.log('Client is ready!'); });
client.on('message', message => { let buttons = new Buttons('Button body', [{ body: 'Aceptar' }, { body: 'rechazar' }], 'title', 'footer'); await client.sendMessage(message.from, buttons); });
fixed, step 1 install Git Bash. step 2 run npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list from Git Bash in the project directory. step 3 - run project And the buttons work
can i see reply button message when cliked?? please
I'd like to discuss about your experience quickly. My gmail is darkcaesar0721@gmail.com.
Thanks for a while! This project is great!! Today I started to try send buttons, and it's not working. A almost all here. If I try isntall https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list the messageSend completly stop to work. So a install the defaul version and its run ok again (witout buttons) For a while I will send only text and make robot with number. Thankyou
Estou com mesmo problema não envia mensagem, quando coloco a atualização
i can run button/list using this step:
- delete folder node_modules
- run this "npm i github:pedroslopez/whatsapp-web.js#fix-buttons-list"
getting this error now :
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'CallCollection') at puppeteer_evaluation_script:9:66 at ExecutionContext._evaluateInternal (C:\sample\biz-chat-nest\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecutionContext.evaluate (C:\sample\biz-chat-nest\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12) at Client.initialize (C:\sample\biz-chat-nest\node_modules\whatsapp-web.js\src\Client.js:274:9)
Estou com mesmo problema não envia mensagem, quando coloco a atualização
Same
Still the same error, anyone has solved it?
same error
Any alternatives for using buttons, they don't seem working now, after the updates. I am installing wweb.js by using hotfix, as described here https://github.com/pedroslopez/whatsapp-web.js/issues/2437
Any updates about the Interactive Messages Support?
fixed, step 1 install Git Bash. step 2 run npm i git+https://github.com/pedroslopez/whatsapp-web.js#fix-buttons-list from Git Bash in the project directory. step 3 - run project
And the buttons work
When I run this command then my client ready is not triggered so then I run this command npm i github:pedroslopez/whatsapp-web.js#main After running this client ready is triggered but button are not working, I think only one command is working at one in my laptop
Is there an existing issue for this?
Describe the bug
the result is the following
Expected behavior
that when having an incoming message send the button
Steps to Reproduce the Bug or Issue
1 link 2 receive message 3 send button
Relevant Code
const qrcode = require('qrcode-terminal'); const { Client, LocalAuth } = require('whatsapp-web.js'); const { Message, ClientInfo, Buttons } = require('whatsapp-web.js/src/structures');
const client = new Client({ authStrategy: new LocalAuth(), puppeteer: { headless: false } });
client.on('ready', () => { console.clear(); console.log('season ok'); });
client.on('qr', qr => { console.log('link QR'); qrcode.generate(qr, { small: true }); });
client.initialize();
client.on('message', msg => { console.log('mensaje de: ', msg.from, 'Texto: ', msg.body) if (msg.body === 'Hello') { let button = new Buttons('Button body', [{ body: 'Aceptar' }, { body: 'rechazar' }], 'title', 'footer'); client.sendMessage(msg.from, button); } });
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
•SO Windows 10 x64 professional. • Phone Android. • Version WhatsApp-web.js 1.18.0. • Version node 18.12.0.
Additional context
sin contexto adicional