cdw1p icon

KahootFlooder.js

cdw1p | PRO | 10/18/20 05:24:45 PM UTC (Edited) | 0 ⭐ | 950 👁️ | Never ⏰ | []
text |

690 B

|

None

|

0 👍

/

0 👎

const Kahoot = require('kahoot.js-updated')
 function createClient(i, name, gamePin) {
    try {
    var client = new Kahoot;
    console.log('Joining kahoot... ' + i)
    var b = name
    client.join(gamePin, b+i)
    client.on('questionStart', question => {
      console.log('A new question has started, answering the first answer.')
      setTimeout(() => {
        question.answer(Math.floor(Math.random()*4))
      }, Math.random() * 4)
    })
    return client
} catch (e) {}
}
 (async() => {
	let gamePin = '2236050'
  let jmlBot = 10
	for (let i = 0; i < jmlBot; i++) {
    setTimeout(() => {
      createClient(i+1, 'Robot Cerdas @ ', gamePin)
    }, (i*200))
  }
})()

Comments