Unable to get property 'id' of undefined or null reference - [email protected]

When turning on the Discord bot, I get this TypeError:
TypeError: Unable to get property 'id' of undefined or null reference
at ClientDataManager.prototype.newChannel (D:\plugin\node_modules\discord.js\src\client\ClientDataManager.js:81:9)
at Guild.prototype.setup (D:\plugin\node_modules\discord.js\src\structures\Guild.js:307:44)
at GuildCreateHandler.prototype.handle (D:\plugin\node_modules\discord.js\src\client\websocket\packets\handlers\GuildCreate.js:12:9)
at WebSocketPacketManager.prototype.handle (D:\plugin\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:108:34)
at WebSocketConnection.prototype.onPacket (D:\plugin\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:336:9)
at WebSocketConnection.prototype.onMessage (D:\plugin\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:299:5)
at onMessage (D:\plugin\node_modules\ws\lib\event-target.js:120:7)
at Reflect.apply (native code)
at emit (events.js:189:5)
at receiverOnMessage (D:\plugin\node_modules\ws\lib\websocket.js:789:3)
at Reflect.apply (native code)
at emit (events.js:189:5)
at Receiver.prototype.dataMessage (D:\plugin\node_modules\ws\lib\receiver.js:413:9)
at Receiver.prototype.getData (D:\plugin\node_modules\ws\lib\receiver.js:352:5)
at Receiver.prototype.startLoop (D:\plugin\node_modules\ws\lib\receiver.js:138:11)
at Receiver.prototype._write (D:\plugin\node_modules\ws\lib\receiver.js:74:5)
TypeError: Unable to get property 'id' of undefined or null reference
at ClientDataManager.prototype.newChannel (D:\plugin\node_modules\discord.js\src\client\ClientDataManager.js:81:9)
at Guild.prototype.setup (D:\plugin\node_modules\discord.js\src\structures\Guild.js:307:44)
at GuildCreateHandler.prototype.handle (D:\plugin\node_modules\discord.js\src\client\websocket\packets\handlers\GuildCreate.js:12:9)
at WebSocketPacketManager.prototype.handle (D:\plugin\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:108:34)
at WebSocketConnection.prototype.onPacket (D:\plugin\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:336:9)
at WebSocketConnection.prototype.onMessage (D:\plugin\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:299:5)
at onMessage (D:\plugin\node_modules\ws\lib\event-target.js:120:7)
at Reflect.apply (native code)
at emit (events.js:189:5)
at receiverOnMessage (D:\plugin\node_modules\ws\lib\websocket.js:789:3)
at Reflect.apply (native code)
at emit (events.js:189:5)
at Receiver.prototype.dataMessage (D:\plugin\node_modules\ws\lib\receiver.js:413:9)
at Receiver.prototype.getData (D:\plugin\node_modules\ws\lib\receiver.js:352:5)
at Receiver.prototype.startLoop (D:\plugin\node_modules\ws\lib\receiver.js:138:11)
at Receiver.prototype._write (D:\plugin\node_modules\ws\lib\receiver.js:74:5)
I'm aware that I should update but I have to remain on v11.6.4 because I'm using node-chakracore and apparently versions past v12 don't work (v14 didn't for me)... Other ppl had this issue before but I couldn't find a solution. The bot does connect to discord but it doesn't receive any message event for example. node -v says v20.12.2
5 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
XXL Steve
XXL SteveOP9mo ago
so there's no way to make it work before v12 anymore?
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
XXL Steve
XXL SteveOP9mo ago
alright, thanks for your help
Want results from more Discord servers?
Add your server