Open matheusbsant opened 6 months ago
Have you tried onAnyMessage() ?
Are you sure your if clause is matching? (sorry, have to ask)
i've the same problem
Node: 18 Venom: 5.1.0
Are you sure your if clause is matching? (sorry, have to ask)
Even with onAnyMessage, it connects but does not recognize the message. Yes, with the "if" everything is fine.
There have been a number of updates committed to the repo that have not been officially released yet.
You could try installing directly from the repo ... "venom-bot: "github:orkestral/venoml#master" ...
same here
@matheusbsant, maybe it is just on my machine, but it has been working since I added this line:
venom
.create({
session: 'carneiro-wpp-bot1',
+ defaultOptions: { ...defaultOptions },
})
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
});
I'm having a problem where I can connect to Venom. But when it's time to read the messages it doesn't do it, anyone with the same problem? Would someone have any idea how to solve it?
Version: 5.1.0
Even with this basic code, it does not recognize messages:
`import { Message, Whatsapp, create } from "venom-bot"
create({ session: "venom-bot", disableWelcome: true, }) .then(async (client: Whatsapp) => await start(client)) .catch((err) => { console.log(err) })
async function start(client: Whatsapp) { client.onMessage(async (message: Message) => { if (!message.body || message.isGroupMsg) return
}`