izy521 / discord.io

A small, single-file library for creating DiscordApp clients from Node.js or the browser
https://discord.gg/0MvHMfHcTKVVmIGP
MIT License
535 stars 155 forks source link

TypeError: Cannot read property 'roles' of undefined #228

Open Peter-Maguire opened 6 years ago

Peter-Maguire commented 6 years ago
TypeError: Cannot read property 'roles' of undefined
at DiscordClient.handleWSMessage (/node_modules/discord.io/lib/index.js:1781:57)
at emitTwo (events.js:125:13)
at WebSocket.emit (events.js:213:7)
at Receiver.ontext (/node_modules/ws/lib/WebSocket.js:841:10)
at /node_modules/ws/lib/Receiver.js:536:18
at Receiver.applyExtensions (/node_modules/ws/lib/Receiver.js:371:5)
at /node_modules/ws/lib/Receiver.js:508:14
at Receiver.flush (/node_modules/ws/lib/Receiver.js:347:3)
at Receiver.finish (/node_modules/ws/lib/Receiver.js:541:12)
at Receiver.expectHandler (/node_modules/ws/lib/Receiver.js:499:31)
at Receiver.add (/node_modules/ws/lib/Receiver.js:103:24)
at TLSSocket.realHandler (/node_modules/ws/lib/WebSocket.js:825:20)
at emitOne (events.js:115:13)
at TLSSocket.emit (events.js:210:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at TLSSocket.Readable.push (_stream_readable.js:208:10)
at TLSWrap.onread (net.js:597:20)

Caused by discord sending GUILD_LEAVE with no data, I believe.

shaun-wild commented 6 years ago

Oh my god I thought I recognized your username from somewhere. I just came across this from an internet search and it's you :P

Peter-Maguire commented 6 years ago

Well holy shit, how about that

shaun-wild commented 6 years ago

Do you recognize my name

Peter-Maguire commented 6 years ago

Yes

shaun-wild commented 6 years ago

@Shaun#8962 add me on discord

00xNULL commented 6 years ago

guys what about a solution to this issue? Can I join the bromance?

Peter-Maguire commented 6 years ago

I'd love to help but I just switched to discord.js instead

On Thu, 28 Jun 2018, 8:57 pm FIISHxMAN, notifications@github.com wrote:

guys what about a solution to this issue? Can I join the bromance?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/izy521/discord.io/issues/228#issuecomment-401154495, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsFbxw2-X95RUT7LgDmHaTCkm3DfZ5wks5uBTU6gaJpZM4QcbhO .

Code-Craver commented 6 years ago

well i was using discord.js and got the same issue