Skip to content
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

Issue while looping #8

Open
rectof opened this issue Sep 13, 2017 · 4 comments
Open

Issue while looping #8

rectof opened this issue Sep 13, 2017 · 4 comments

Comments

@rectof
Copy link

rectof commented Sep 13, 2017

read below, solved this.

@rectof
Copy link
Author

rectof commented Sep 15, 2017

nvm im autistic.

I have another issue though, when I try looping the join function, I get this error, I've tried just about everything and cant figure it out. Sorry if this is a hassle lol

events.js:187
      throw err;
      ^
 

Error: Unhandled "error" event. (USER_INPUT)
    at WSHandler.emit (events.js:185:19)
    at WSHandler.message (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\kahoot.js\src\WSHandler.js:241:8)
    at WebSocket.WSHandler.ws.on.msg (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\kahoot.js\src\WSHandler.js:26:7)
    at emitOne (events.js:115:13)
    at WebSocket.emit (events.js:210:7)
    at Receiver._receiver.onmessage (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\ws\lib\WebSocket.js:143:47)
    at Receiver.dataMessage (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\ws\lib\Receiver.js:389:14)
    at Receiver.getData (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\ws\lib\Receiver.js:330:12)
    at Receiver.startLoop (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\ws\lib\Receiver.js:165:16)
    at Receiver.add (C:\Users\Recto\Desktop\discordBots\kahoot\node_modules\ws\lib\Receiver.js:139:10)

@rectof rectof changed the title TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object. Issue while looping Sep 15, 2017
@dustinrouillard
Copy link
Contributor

I can help you with this issue right now, this is because the name is the same as another connected user. Use an auto incrementing number.

count = 0;

setInterval(() => {
  count++;
  let name = `Bot-${count}`;
})

@dustinrouillard
Copy link
Contributor

How are you looping through this, also for anyone wondering what the first error was about.

That would be the kahoot room was no longer accessible. I'm gonna make a pull request or maybe even my own module to fix the issues I've found with this.

@Ekstropiya
Copy link

Ekstropiya commented Oct 6, 2018

I am having the same problem with looping, I have tried multiple ways of making the names different every loop. It just dosen't work. I can't even join twice with totally different names like this:

client.join(00000, "Lorem")
client.join(00000, "Ipsum")

And it still dosen't work. I would really appreciate it if you helped me with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants