mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-19 12:09:15 +00:00
feat: ⚡ qr code filename
This commit is contained in:
@@ -19,9 +19,11 @@ const logger = new Console({
|
||||
* https://github.com/pedroslopez/whatsapp-web.js
|
||||
*/
|
||||
class WebWhatsappProvider extends ProviderClass {
|
||||
globalVendorArgs = { qrFile: 'qr.png' }
|
||||
vendor
|
||||
constructor() {
|
||||
constructor(args) {
|
||||
super()
|
||||
this.globalVendorArgs = { ...this.globalVendorArgs, ...args }
|
||||
this.vendor = new Client({
|
||||
authStrategy: new LocalAuth(),
|
||||
puppeteer: {
|
||||
|
||||
@@ -11,8 +11,8 @@ const wwebCleanNumber = (number, full = false) => {
|
||||
return number
|
||||
}
|
||||
|
||||
const wwebGenerateImage = async (base64) => {
|
||||
const PATH_QR = `${process.cwd()}/qr.png`
|
||||
const wwebGenerateImage = async (base64, name = 'qr.png') => {
|
||||
const PATH_QR = `${process.cwd()}/${name}`
|
||||
let qr_svg = qr.image(base64, { type: 'png', margin: 4 })
|
||||
|
||||
const writeFilePromise = () =>
|
||||
|
||||
Reference in New Issue
Block a user