orkestral / venom

Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
https://orkestral.io
Apache License 2.0
6.13k stars 1.21k forks source link

Not saving session and not detecting incoming messages #1371

Closed betozarzoza closed 2 years ago

betozarzoza commented 2 years ago

Description

I've used venom bot for a few weeks, then suddendly it stopped sending messages, I installed everything again and use the most basic code to see if it was working and it's not, every time that I try to run my local server it request to read the QR again and when it says it's connected I send a message but nothing happens.

Environment

Your Code

const venom = require('venom-bot'); console.log('testing venom bot') venom .create({ session: 'session-name', //name of session multidevice: true // for version not multidevice use false.(default: true) }) .then((client) => start(client)) .catch((erro) => { console.log(erro); });

function start(client) { client.onMessage((message) => { console.log('message received') if (message.body === 'Hi' && message.isGroupMsg === false) { client .sendText(message.from, 'Welcome Venom 🕷') .then((result) => { console.log('Result: ', result); //return object success }) .catch((erro) => { console.error('Error when sending: ', erro); //return object error }); } }); }

SLotman commented 2 years ago

Update it. Venom is in 4.0.x, version 3.1 won't work anymore because whatsapp web has changed.