Made a command for user information, gives an error
Made a command for user information, gives an error
13 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!Can you show me \events\InteractionCreate.js line 18?
You're probably missing the GuildMembers intent
Maybe, but I didn't quite understand, is it possible somehow in the code?
Its inside main js file
What do you mean?
I found this only in index.js
You need to add the
GuildMembers
intent to fetch all members
interactionCreate.js
The bot thinks
In your
interactionCreate.js
, you should only .reply()
if both interaction.replied
and interaction.deferred
are false
Otherwise, you should .followUp()
or .editReply()
since you have already acknowledged the interactionTo be honest, I don't fully understand what I need to do now.
What's happening right now is:
1) It works as normal, reaches your command files, and calls
deferReply()
2) Some error occurs
3) It gets kicked out and into your error handler in interactionCreate.js
, but because you already acknowledged the interaction, the interaction.reply()
is throwing an error