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:
@@ -20,9 +20,11 @@ const logger = new Console({
|
||||
* https://github.com/orkestral/venom
|
||||
*/
|
||||
class VenomProvider extends ProviderClass {
|
||||
globalVendorArgs = { qrFile: 'qr.png' }
|
||||
vendor
|
||||
constructor() {
|
||||
constructor(args) {
|
||||
super()
|
||||
this.globalVendorArgs = { ...this.globalVendorArgs, ...args }
|
||||
this.init().then(() => this.initBusEvents())
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ const venomCleanNumber = (number, full = false) => {
|
||||
return number
|
||||
}
|
||||
|
||||
const venomGenerateImage = async (base) => {
|
||||
const PATH_QR = `${process.cwd()}/qr.png`
|
||||
const venomGenerateImage = async (base, name = 'qr.png') => {
|
||||
const PATH_QR = `${process.cwd()}/${name}`
|
||||
const matches = base.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/)
|
||||
if (matches.length !== 3) {
|
||||
return new Error('Invalid input string')
|
||||
|
||||
Reference in New Issue
Block a user