GithubHelp home page GithubHelp logo

Comments (11)

joedutra avatar joedutra commented on August 30, 2024

he gets in scope now 2 callback

 venom.create("session-develop").then((client) => {
			  start(client)
			}).catch(erro => console.log(erro)) 

OR

venom.create("session-develop", ("statusFind") =>{
console.log(statusFind)
}).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))

OR

venom.create("session-name", (base64Qr, asciiQR) => {
   	
   		console.log(asciiQR);
   		
   	   exportQR(base64Qr, "documentos/qrcode.png");

   	  }, (statusFind) =>{

   		  console.log(statusFind)

   	  }).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))

from venom.

brainwares avatar brainwares commented on August 30, 2024

Tried using this sample

create('sessionName', qrCallback, {
headless: true, // Headless chrome
devtools: false, // Open devtools by default
useChrome: true, // If false will use Chromium instance
debug: false, // Opens a debug session
logQR: true // Logs QR automatically in terminal
browserArgs: [''] // Parameters to be added into the chrome browser instance
refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
});

from venom.

orkestral avatar orkestral commented on August 30, 2024

Hello! 5 options:

   venom.create("session-name", {
			headless: true, // Headless chrome
			devtools: false, // Open devtools by default
			useChrome: true, // If false will use Chromium instance
			debug: false, // Opens a debug session
			logQR: true, // Logs QR automatically in terminal
			browserArgs: [''], // Parameters to be added into the chrome browser instance
			refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))
venom.create("session-develop", (base64Qr, asciiQR) => {
   		// To log the QR in the terminal
   		console.log(asciiQR);
   		// To write it somewhere else in a file
   	   exportQR(base64Qr, "documentos/file.png");
   	  }, (statusFind) =>{
   		  console.log(statusFind+'\n\n')
   	  },{
   		headless: true, // Headless chrome
   		devtools: false, // Open devtools by default
   		useChrome: true, // If false will use Chromium instance
   		debug: false, // Opens a debug session
   		logQR: true, // Logs QR automatically in terminal
   		browserArgs: [''], // Parameters to be added into the chrome browser instance
   		refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
   	  }).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))
 venom.create("session-develop", (base64Qr, asciiQR) => {
			// To log the QR in the terminal
			console.log(asciiQR);
			// To write it somewhere else in a file
		   exportQR(base64Qr, "documentos/file.png");
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))
 venom.create("session-develop",() =>{}, (statusFind) =>{
			  console.log(statusFind+'\n\n')
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))
 venom.create("session-develop").then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

from venom.

orkestral avatar orkestral commented on August 30, 2024

Updated documentation, Thank You!

from venom.

brainwares avatar brainwares commented on August 30, 2024

Hello! 5 options:

   venom.create("session-name", {
			headless: true, // Headless chrome
			devtools: false, // Open devtools by default
			useChrome: true, // If false will use Chromium instance
			debug: false, // Opens a debug session
			logQR: true, // Logs QR automatically in terminal
			browserArgs: [''], // Parameters to be added into the chrome browser instance
			refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is not working. Error result:
TypeError: catchQR is not a function
at SafeSubscriber._next (/.../node_modules/venom-bot/dist/controllers/initializer.js:219:13)

venom.create("session-develop", (base64Qr, asciiQR) => {
   		// To log the QR in the terminal
   		console.log(asciiQR);
   		// To write it somewhere else in a file
   	   exportQR(base64Qr, "documentos/file.png");
   	  }, (statusFind) =>{
   		  console.log(statusFind+'\n\n')
   	  },{
   		headless: true, // Headless chrome
   		devtools: false, // Open devtools by default
   		useChrome: true, // If false will use Chromium instance
   		debug: false, // Opens a debug session
   		logQR: true, // Logs QR automatically in terminal
   		browserArgs: [''], // Parameters to be added into the chrome browser instance
   		refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
   	  }).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))

Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop", (base64Qr, asciiQR) => {
			// To log the QR in the terminal
			console.log(asciiQR);
			// To write it somewhere else in a file
		   exportQR(base64Qr, "documentos/file.png");
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

Same Error...
Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop",() =>{}, (statusFind) =>{
			  console.log(statusFind+'\n\n')
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This Sample is working, but I need to set the debug parameters to be true.

 venom.create("session-develop").then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is working, but need debug parameters to be true

from venom.

orkestral avatar orkestral commented on August 30, 2024

Hello! 5 options:

   venom.create("session-name", {
			headless: true, // Headless chrome
			devtools: false, // Open devtools by default
			useChrome: true, // If false will use Chromium instance
			debug: false, // Opens a debug session
			logQR: true, // Logs QR automatically in terminal
			browserArgs: [''], // Parameters to be added into the chrome browser instance
			refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is not working. Error result:
TypeError: catchQR is not a function
at SafeSubscriber._next (/.../node_modules/venom-bot/dist/controllers/initializer.js:219:13)

venom.create("session-develop", (base64Qr, asciiQR) => {
   		// To log the QR in the terminal
   		console.log(asciiQR);
   		// To write it somewhere else in a file
   	   exportQR(base64Qr, "documentos/file.png");
   	  }, (statusFind) =>{
   		  console.log(statusFind+'\n\n')
   	  },{
   		headless: true, // Headless chrome
   		devtools: false, // Open devtools by default
   		useChrome: true, // If false will use Chromium instance
   		debug: false, // Opens a debug session
   		logQR: true, // Logs QR automatically in terminal
   		browserArgs: [''], // Parameters to be added into the chrome browser instance
   		refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
   	  }).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))

Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop", (base64Qr, asciiQR) => {
			// To log the QR in the terminal
			console.log(asciiQR);
			// To write it somewhere else in a file
		   exportQR(base64Qr, "documentos/file.png");
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

Same Error...
Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop",() =>{}, (statusFind) =>{
			  console.log(statusFind+'\n\n')
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This Sample is working, but I need to set the debug parameters to be true.

 venom.create("session-develop").then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is working, but need debug parameters to be true

It is not normal to work this example which is just an example, but it is not a qr function, now and with you, here is only taught how to mess with the repo, more follows a part of the code:

function exportQR(qrCode, path) {
			  qrCode = qrCode.replace("data:image/png;base64,", "");
			  const imageBuffer = Buffer.from(qrCode, "base64");
			
			  // Creates "marketing-qr.png" file
			  fs.writeFileSync(path, imageBuffer);
			}

look the documentation

from venom.

brainwares avatar brainwares commented on August 30, 2024

Hello! 5 options:

   venom.create("session-name", {
			headless: true, // Headless chrome
			devtools: false, // Open devtools by default
			useChrome: true, // If false will use Chromium instance
			debug: false, // Opens a debug session
			logQR: true, // Logs QR automatically in terminal
			browserArgs: [''], // Parameters to be added into the chrome browser instance
			refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is not working. Error result:
TypeError: catchQR is not a function
at SafeSubscriber._next (/.../node_modules/venom-bot/dist/controllers/initializer.js:219:13)

venom.create("session-develop", (base64Qr, asciiQR) => {
   		// To log the QR in the terminal
   		console.log(asciiQR);
   		// To write it somewhere else in a file
   	   exportQR(base64Qr, "documentos/file.png");
   	  }, (statusFind) =>{
   		  console.log(statusFind+'\n\n')
   	  },{
   		headless: true, // Headless chrome
   		devtools: false, // Open devtools by default
   		useChrome: true, // If false will use Chromium instance
   		debug: false, // Opens a debug session
   		logQR: true, // Logs QR automatically in terminal
   		browserArgs: [''], // Parameters to be added into the chrome browser instance
   		refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
   	  }).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))

Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop", (base64Qr, asciiQR) => {
			// To log the QR in the terminal
			console.log(asciiQR);
			// To write it somewhere else in a file
		   exportQR(base64Qr, "documentos/file.png");
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

Same Error...
Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop",() =>{}, (statusFind) =>{
			  console.log(statusFind+'\n\n')
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This Sample is working, but I need to set the debug parameters to be true.

 venom.create("session-develop").then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is working, but need debug parameters to be true

It is not normal to work this example which is just an example, but it is not a qr function, now and with you, here is only taught how to mess with the repo, more follows a part of the code:

function exportQR(qrCode, path) {
			  qrCode = qrCode.replace("data:image/png;base64,", "");
			  const imageBuffer = Buffer.from(qrCode, "base64");
			
			  // Creates "marketing-qr.png" file
			  fs.writeFileSync(path, imageBuffer);
			}

look the documentation

It's working now, thanks!
In the
console.log(statusFind+'\n\n')
doesn't seem to return any value, is that right?

from venom.

orkestral avatar orkestral commented on August 30, 2024

Hello! 5 options:

   venom.create("session-name", {
			headless: true, // Headless chrome
			devtools: false, // Open devtools by default
			useChrome: true, // If false will use Chromium instance
			debug: false, // Opens a debug session
			logQR: true, // Logs QR automatically in terminal
			browserArgs: [''], // Parameters to be added into the chrome browser instance
			refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is not working. Error result:
TypeError: catchQR is not a function
at SafeSubscriber._next (/.../node_modules/venom-bot/dist/controllers/initializer.js:219:13)

venom.create("session-develop", (base64Qr, asciiQR) => {
   		// To log the QR in the terminal
   		console.log(asciiQR);
   		// To write it somewhere else in a file
   	   exportQR(base64Qr, "documentos/file.png");
   	  }, (statusFind) =>{
   		  console.log(statusFind+'\n\n')
   	  },{
   		headless: true, // Headless chrome
   		devtools: false, // Open devtools by default
   		useChrome: true, // If false will use Chromium instance
   		debug: false, // Opens a debug session
   		logQR: true, // Logs QR automatically in terminal
   		browserArgs: [''], // Parameters to be added into the chrome browser instance
   		refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
   	  }).then((client) => {
   		  start(client)
   		}).catch(erro => console.log(erro))

Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop", (base64Qr, asciiQR) => {
			// To log the QR in the terminal
			console.log(asciiQR);
			// To write it somewhere else in a file
		   exportQR(base64Qr, "documentos/file.png");
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

Same Error...
Not working also
ReferenceError: exportQR is not defined

 venom.create("session-develop",() =>{}, (statusFind) =>{
			  console.log(statusFind+'\n\n')
		  }).then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This Sample is working, but I need to set the debug parameters to be true.

 venom.create("session-develop").then((client) => {
			  start(client)
			}).catch(erro => console.log(erro))

This is working, but need debug parameters to be true

It is not normal to work this example which is just an example, but it is not a qr function, now and with you, here is only taught how to mess with the repo, more follows a part of the code:

function exportQR(qrCode, path) {
			  qrCode = qrCode.replace("data:image/png;base64,", "");
			  const imageBuffer = Buffer.from(qrCode, "base64");
			
			  // Creates "marketing-qr.png" file
			  fs.writeFileSync(path, imageBuffer);
			}

look the documentation

It's working now, thanks!
In the
console.log(statusFind+'\n\n')
doesn't seem to return any value, is that right?

Callback Status Session
Gets the return if the session is isLogged or if it is notLogged

create('sessionName', qrCallback, (statusFind) => {
  console.log(statusFind);
})
  .then((client) => {
    start(client);
  })
  .catch((erro) => console.log(erro));

from venom.

brainwares avatar brainwares commented on August 30, 2024

Callback Status Session
Gets the return if the session is isLogged or if it is notLogged

create('sessionName', qrCallback, (statusFind) => {
  console.log(statusFind);
})
  .then((client) => {
    start(client);
  })
  .catch((erro) => console.log(erro));

Screen Shot 2020-06-09 at 02 27 50

I don't see the Status Session logged in the console.

from venom.

orkestral avatar orkestral commented on August 30, 2024

here working, update npm venom-bot

image

from venom.

brainwares avatar brainwares commented on August 30, 2024

here working, update npm venom-bot

image

Very nice!
It is working now. Thanks!

from venom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.