Don't understand where to write this code.
Please explain where need to write this code. I have re-read the documentation on this code more than a dozen times and still did not understand. When I try to write this code in files that are responsible for events, I get an error:
A similar error occurred when trying to insert this code into the command itself.
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!discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Do you copy and paste the whole code block? You shouldn't. It's just an example. The part it talks about is highlighted
Thanks for the clarification. A strange example that doesn't work, but it's important to me as a beginner
Well, it requires the client to be defined in the scope, which it expects to be done already, as it's just an example code
🤝