WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.92k stars 1.34k forks source link

Monitor private messages only #289

Closed renatoiub closed 1 year ago

renatoiub commented 1 year ago

Is there any way or configuration that can be done to supervise only private messages and exclude messages from groups? I have an instance with several groups, and I would like Baileyes to monitor only private conversations because I noticed that depending on the moment, it causes slowness in sending messages.

is99zsq commented 1 year ago

Is there any way or configuration that can be done to supervise only private messages and exclude messages from groups? I have an instance with several groups, and I would like Baileyes to monitor only private conversations because I noticed that depending on the moment, it causes slowness in sending messages.

why not quitting from the group? if you are in the group, you can received the message and you must ack the msg.

zennn08 commented 1 year ago

try this

import { isJidUser } from "@whiskeysockets/baileys"

const sock = makeWASocket({
  ...your_config,
  shouldIgnoreJid: jid => !isJidUser(jid)
})
renatoiub commented 1 year ago

It is ignoring group messages, but when sending a message in a group it takes at least 30 seconds for a return call to come. Does anyone know what can it be ?

SheIITear commented 1 year ago

This isnt an issue. Ask such questions in discussions or discord.