I have this code here:
var Kahoot = require("kahoot.js-updated");
var client = new Kahoot;
console.log("Joining kahoot...");
client.join(9802345 /* Or any other kahoot game pin */, "kahoot.js");
client.on("joined", () => {
console.log("I joined the Kahoot!");
});
client.on("quizStart", quiz => {
console.log("The quiz has started! The quiz's name is:", quiz.name);
});
client.on("questionStart", question => {
console.log("A new question has started, answering the first answer.");
question.answer(0);
});
client.on("quizEnd", () => {
console.log("The quiz has ended.");
});
And i want to know how to get the bot to join the kahoot multiple times.
I have already tried adding client.setMaxListeners(Number.POSITIVE_INFINITY)
which solves the error with too many listeners. I tried using setInterval()
for the join command but it just says Joining kahoot... and never connects.
How would I get the kahootbot to join said kahoot multiple times? (like 100 times or so)