wwwg / kahoot.js

A library for interacting with Kahoot API.
MIT License
28 stars 8 forks source link

Found an issue when the room doesn't exist. #11

Open dustinrouillard opened 6 years ago

dustinrouillard commented 6 years ago

I made a pull request to actually let you know what the error is when this pops up, I did some research and it looks like this happens whenever the room is not accessible or doesn't exist for whatever reason. @wwwg I'd love if you'd merge my pull request that I've linked below :)

Code that will reproduce (Basically every <Client>.join event with a room that is not accessible)

var Kahoot = require("kahoot.js");
var k = new Kahoot;
console.log("Joining kahoot...");
k.join(000000, "kahoot.js").then(() => {
    console.log("Joined Quiz");
});

Error output

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

My pull request that will output an error letting you know what is wrong. https://github.com/wwwg/kahoot.js/pull/10

gmisail commented 6 years ago

this happens even when a room does exist for me