-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Venom Connected, but not receiving messages #2733
Comments
Have you tried onAnyMessage() ? 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 |
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
}`
The text was updated successfully, but these errors were encountered: