Why my interaction is not defined?

https://sourceb.in/8atz9Es4p2 // node:events:497 throw er; // Unhandled 'error' event ^ ReferenceError: interaction is not defined at Client.<anonymous> (/home/container/index.js:363:3) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:402:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
3 Replies
d.js toolkit
d.js toolkit3mo 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
duck
duck3mo ago
the erroring code seems to be in a ready event listener where you don't have a variable named interaction defined I'm not really sure what interaction you expect to have access to in the ready event
d.js docs
d.js docs3mo ago
- ReferenceError: "x" is not defined: learn more - TypeError: Cannot read properties of undefined/null (reading "x"): learn more
Want results from more Discord servers?
Add your server