Idk why am i getting this error while running bot for first time
C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules\discord.js\src\client\websocket\handlers\READY.js:17
client.guilds._add(guild);
^
TypeError: client.guilds._add is not a function
at module.exports [as READY] (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules\discord.js\src\client\websocket\handlers\READY.js:17:19)
at WebSocketManager.handlePacket (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules@discordjs\ws\dist\index.js:1190:51)
at WebSocketShard.emit (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.onMessage (C:\Users\Pc\Desktop\Discord.JS Bot Economy\node_modules@discordjs\ws\dist\index.js:1005:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.18.2
it seems this error is occuring in READY.js websocked file in discord.js node_module, help?
6 Replies
- 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 OP14.16.3
node is v18.18.2
code:
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
ik
i didnt use it
You are overriding <Client>.guilds with a collection, don't do that
ohhh i see
m so dumb, i last made a bot in 2023
forgot evevrything
works now