UNPKG

venom-bot

Version:

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 archite

20 lines 622 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.scrapeDesconnected = void 0; async function scrapeDesconnected(page) { const result = await page .evaluate(() => { const scrape = window.Store.State.Socket.on('change:state'); if (scrape.__x_stream === 'DISCONNECTED' && scrape.__x_state === 'CONNECTED') { return true; } else { return false; } }) .catch(() => undefined); return result; } exports.scrapeDesconnected = scrapeDesconnected; //# sourceMappingURL=scrape-desconnect.js.map