-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do i run more than once #210
Comments
Here is what I wrote: const Pollmommy = require('pollmommy')
const pollmommy = new Pollmommy()
function autoVote( count = 1 ) {
const poll = 111;
const answer = 222;
const url = 'https://www.your-domain.com';
process.stdout.write(`Contacting ${ String( count ).padStart( 4, '0' ) } - `)
pollmommy.vote( url, poll, answer )
.then( () => {
console.log('\u001B[32mvoted!\u001b[39m');
autoVote( count + 1 );
})
.catch( error => {
console.error(`\u001B[31m${ error.message }\u001b[39m`);
setTimeout( () => autoVote( count ), 1000 );
})
}
autoVote(); |
I need help. I followed the steps to install it and when I run it, it says the vote is successful, but my vote count does not change. The poll ends tomorrow so any help would be appreciated. (I am running it in command prompt) |
where do i put this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, im trying to use this, im new to codeing, how do make it so it run more than just 1 time thanks!
The text was updated successfully, but these errors were encountered: