pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
15.53k stars 3.7k forks source link

Messages are not handled by listener when I send messages to myself for testing #2621

Closed obriankevin11 closed 1 year ago

obriankevin11 commented 1 year ago

Is there an existing issue for this?

Describe the bug

Hi,

I would like to test my bot. I scan the QR code with my phone. Then

How can I send myself messages and have them catched by the listener, in order to test?

Thank you

Expected behavior

When I send myself a message, onMessage client handler should receive it.

Steps to Reproduce the Bug or Issue

Any message that is sent to the registered client are catched by the onMessage event listener.

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Win10 22H2 Phone: iOS whatsapp-web.js: 1.23.0 WhatsApp Web version: 2.2348.50 nodejs: v16.17.0

Additional context

No response

alechkos commented 1 year ago

@obriankevin11

If you want to handle messages sent by you, you have to use message_create event

obriankevin11 commented 1 year ago

Thanks!