whatsapp-web.js
whatsapp-web.js copied to clipboard
Cannot read properties of undefined (reading 'canReply')
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
has issus with when eplay to message
Expected behavior
client.sendMessage(chatid, MessageText, { 'quotedMessageId': quotedMsgId });
Steps to Reproduce the Bug or Issue
client.sendMessage(chatid, MessageText, { 'quotedMessageId': quotedMsgId });
Relevant Code
client.sendMessage(chatid, MessageText, { 'quotedMessageId': quotedMsgId });
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: [e.g. Mac, Windows, Linux, Docker + Ubuntu 18, etc] Phone OS: [e.g. Android, iOS] whatsapp-web.js version [e.g. 1.2.3] WhatsApp Web version [run await client.getWWebVersion()]: Node.js Version [e.g. 1.2.3]
Additional context
sd
So guys, I was having a similar issue to get the group-names, the problem was fixed after I delete my auth-session and create a new one.
I caught the same error "Cannot read properties of undefined (reading 'canReply')"
I am getting this error Cannot read properties of undefined (reading 'canReply')
although it was working just fine before
i removed the if condition 🙃 in Injected.js
if (quotedMessage.canReply()) {.....}
now message.reply() works for me
@Islam-Mohammed-Younes This has been fixed in 1.18.2. Please update again!
EDIT: actually, the error that was fixed is Error: Evaluation failed: TypeError: quotedMessage.canReply is not a function
, but if you're getting an issue with replies after the latest whatsapp change this is probably what you were seeing instead.
@pedroslopez Thanks !
Thats correct the error actually was canReply is not a function
i copied @rndmax error by mistake