whatsapp-connect
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "whatsapp-connect", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "A library that simplifies the initialization and management of WhatsApp Web services using whatsapp-web.js and puppeteer. It generates QR codes as images for authentication, allowing users to scan and then perform additional actions programmatically, such as sending messages", | ||
@@ -5,0 +5,0 @@ "main": "src/wmain.js", |
@@ -16,6 +16,19 @@ const qrcode = require('qrcode-terminal'); | ||
// Objeto que representa el cliente de WhatsApp | ||
// const whatsappClient = new Client({ | ||
const whatsappClient = new Client({ | ||
webVersionCache: { | ||
type: 'remote', | ||
remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2410.1.html', | ||
}, | ||
authStrategy: new LocalAuth(), | ||
puppeteer: { | ||
headless: true, | ||
args: ["--no-sandbox"] | ||
} | ||
}); | ||
// const whatsappClient = new Client({ | ||
// webVersionCache: { | ||
// type: 'remote', | ||
// remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2410.1.html', | ||
// remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2402.5.html', | ||
// }, | ||
@@ -29,7 +42,6 @@ // authStrategy: new LocalAuth(), | ||
// const whatsappClient = new Client({ | ||
// const whatsappClient = new Client({ | ||
// webVersionCache: { | ||
// type: 'remote', | ||
// remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2402.5.html', | ||
// remotePath: 'https://raw.githubusercontent.com/fralch/CrediWhatsapp-connect/main/wcache.html', | ||
// }, | ||
@@ -43,14 +55,2 @@ // authStrategy: new LocalAuth(), | ||
const whatsappClient = new Client({ | ||
webVersionCache: { | ||
type: 'remote', | ||
remotePath: 'https://raw.githubusercontent.com/fralch/CrediWhatsapp-connect/main/wcache.html', | ||
}, | ||
authStrategy: new LocalAuth(), | ||
puppeteer: { | ||
headless: true, | ||
args: ["--no-sandbox"] | ||
} | ||
}); | ||
// Evento para generar y guardar un código QR | ||
@@ -57,0 +57,0 @@ whatsappClient.on('qr', async qr => { |