[instance: session-name]: Connected venom bot #1941
morisato32
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
apparently everything is ok, when I scan the qrcode it connects to google grome the session is active, but it does not open we.whatsapp and when I scan it again it says it cannot connect at the moment.
Segue meu código 👍
const venom = require('venom-bot');
venom
.create({
session: 'session-name', //name of session
multidevice: false // for version not multidevice use false.(default: true)
})
.then((client) => start(client))
.catch((erro) => {
console.log(erro);
});
function start(client) {
client.onMessage((message) => {
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
});
}
})}
Beta Was this translation helpful? Give feedback.
All reactions