Discord.js: Cannot read Channel on startup

Created on 24 Sep 2017  Â·  4Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:

Cannot startup the bot as the error indicates that it cannot read Guild Channel objects.

1|dtel     | TypeError: Cannot read property 'members' of undefined
1|dtel     |     at Guild.setup (/home/austin/node_modules/discord.js/src/structures/Guild.js:215:51)
1|dtel     |     at GuildCreateHandler.handle (/home/austin/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:12:15)
1|dtel     |     at WebSocketPacketManager.handle (/home/austin/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
1|dtel     |     at WebSocketConnection.onPacket (/home/austin/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:330:35)
1|dtel     |     at WebSocketConnection.onMessage (/home/austin/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:293:17)
1|dtel     |     at WebSocketClient.internalOnMessage (/home/austin/node_modules/uws/uws.js:103:17)
1|dtel     |     at native.client.group.onMessage (/home/austin/node_modules/uws/uws.js:57:15)

It says it's from "GuildCreate", I tried to commentify everything about GuildCreate but same problem remains. I also tried to commentify the part where the bot reads members from a specific role in a specific guild, which also failed.

As the second comment says, I have also removed all parts associated with voice, which also failed

Include a reproducible code sample here, if possible:

https://github.com/austinhuang0131/discordtel/blob/master/index.js and the error is not telling me which line is it

Further details:

  • discord.js version: 11.2.1
  • node.js version: 6.11.2
  • Operating system: CentOS 5
  • Priority this issue should have – please be realistic and elaborate if possible:

  • [ ] I found this issue while running code on a __user account__
  • [ ] I have also tested the issue on latest master, commit hash:
unverified REST bug

All 4 comments

So I should remove all parts associated with voice? Doesn't work

Note: All voice-related codes in the bot are not public

npm i hydrabolt/discord.js#stable actually solved it

This was the exact issue i was having...

Decided to update everything to v12-dev

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Blumlaut picture Blumlaut  Â·  3Comments

xCuzImPro picture xCuzImPro  Â·  3Comments

tiritto picture tiritto  Â·  3Comments

Brawaru picture Brawaru  Â·  3Comments

ghost picture ghost  Â·  3Comments