venom icon indicating copy to clipboard operation
venom copied to clipboard

Multiplas sessoes nao funcionam

Open Rafael-720 opened this issue 1 year ago • 1 comments

As sessão não estão sendo salvas, tem a pasta tokens e gera o qr code, mas ai quando reinicio o cmd pede pra escanear novamente o qrcode, isso pra multiplas sessões, pois 1 sessão funciona, podem me ajudar? Tem alguma forma de salvar a sessão, ou teria que salvar a pasta tokens toda?, a sessão só é salva quando da client.close??

meu codigo:

import fs from 'fs'; import { create } from 'venom-bot';

const sessions = ['sessao1', 'sessao2'];

sessions.forEach((session) => { create({ session: session, multidevice: true }) .then((client) => start(client)) .catch((error) => { console.log(error); }) });

async function start(client) { const botText = "🤖 world 🌎"

client.onAnyMessage((message) => {
    if (message.body.toLowerCase() === "hello") {
        
        client.sendText(message.from, botText)
    }
})

// Catch ctrl+C

process.on('SIGINT', function() { client.close(); }); }

Rafael-720 avatar Sep 18 '23 14:09 Rafael-720

@Rafael-720 , conseguiu algum progresso?

augustosnk12 avatar Dec 20 '23 00:12 augustosnk12

New Release: npm i [email protected] We have support for Venom for just $15 per month, if you are interested, call our support via the link: https://web.whatsapp.com/send?phone=5561985290357

orkestral avatar Apr 03 '24 15:04 orkestral