XXL Steve
XXL Steve
DIAdiscord.js - Imagine a boo! 👻
Created by XXL Steve on 4/18/2024 in #djs-questions
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
8 replies