Im getting an error that i dont know how to solve

error:
TypeError: Cannot read properties of undefined (reading 'get')
at change_status (/home/container/events/client/ready.js:56:68)
at module.exports (/home/container/events/client/ready.js:33:5)
at Client.emit (node:events:525:35)
at WebSocketManager.triggerClientReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:387:17)
at WebSocketManager.checkShardsReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:370:10)
at WebSocketShard.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:200:16)
at WebSocketShard.emit (node:events:513:28)
at WebSocketShard.checkReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:181:12)
at WebSocketShard.gotGuild (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:155:10)
at WebSocketManager.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:240:15)
TypeError: Cannot read properties of undefined (reading 'get')
at change_status (/home/container/events/client/ready.js:56:68)
at module.exports (/home/container/events/client/ready.js:33:5)
at Client.emit (node:events:525:35)
at WebSocketManager.triggerClientReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:387:17)
at WebSocketManager.checkShardsReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:370:10)
at WebSocketShard.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:200:16)
at WebSocketShard.emit (node:events:513:28)
at WebSocketShard.checkReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:181:12)
at WebSocketShard.gotGuild (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:155:10)
at WebSocketManager.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:240:15)
9 Replies
d.js toolkit
d.js toolkit17mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers. - Issue solved? Press the button!
NNKtv28
NNKtv28OP17mo ago
Gist
ready.js
GitHub Gist: instantly share code, notes, and snippets.
NNKtv28
NNKtv28OP17mo ago
btw Node.js version is 19
Syjalo
Syjalo17mo ago
discord.js doesn't provide client.stats It's a custom property that you didn't define
NNKtv28
NNKtv28OP17mo ago
how do i do it then??
Syjalo
Syjalo17mo ago
Idk, that's your custom property
NNKtv28
NNKtv28OP17mo ago
F T_T
Ricardo
Ricardo17mo ago
what's client.stats?
NNKtv28
NNKtv28OP17mo ago
?solved
Want results from more Discord servers?
Add your server