#Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'isMyContact')

13 messages · Page 1 of 1 (latest)

visual egret
#

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:

severe quartz
#

some solution might help you

  1. get msg.getContact Better

  2. 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.

  3. Ensure that you are handling these operations correctly, using async/await or .then()

amber oxide
visual egret
visual egret
visual egret
#

I have already opened the issue

amber oxide
visual egret
#

Is the last one

amber oxide
visual egret
#

😱

severe quartz
#

oh it from the library

#

i wasn't know that it from library i thought it from code