I'm currently implementing a spam mechanism with my bot. I have a method that evaluates certain parameters, and if I detect spam, I want to block the user. However, when I try to do so, I encounter the following error: "Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'isMyContact')". Here's the code I'm using:
#Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'isMyContact')
13 messages · Page 1 of 1 (latest)
some solution might help you
-
get msg.getContact Better
-
Update the library: Make sure you are using the latest version of whatsapp-web.js. You can update it using npm (Node Package Manager) by running the command npm update whatsapp-web.js in your project's directory.
-
Ensure that you are handling these operations correctly, using async/await or .then()
the probleme I think is in the library
in Contact.block methode
Same error using msg.getContact() :l
i think so too, how can we notice to pedro or purpshell this bug for correction?
open an issue in github
I have already opened the issue
well +300 issues ....
Is the last one
no I mean it will be like drop in the bucket
😱