Application did not respond
Hey there! I decided to hop into discord js without almost no js knowledge (I know, not a good practice). I'm currently trying to create a slash command. The command is registered, however it seems like the async execute part of my slash builder is not working? Would appreciate some help.
10 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 OP
I tried defering it, but no luck.
Also, no errors in the console. Just the application didn't respond.
I don't think I have one. Didn't see the docs referring to one. I might be just blind tho 😄
Thanks!
I modified my code accordingly but I get a Cannot read properties of undefined (reading 'commands') error now
When trying to execute a command
Here's how my code looks like now
bot
is not a property on interaction
it should be
interaction.client
How come? I have my client defined as bot,
It works with interaction.client though so thank you both
thats just the variable name you gave it in your index
i would suggest learning the basics of js first
because as you mentioned, its not a good idea to code a bot without any knowledge (and having this knowledge is a requirement, as per #rules 3)
Hmm alrighty
Thanks for the help