JS Problems with global Slash commands in DMs
Can someone help me with this? I have some global commands that appear on any server without the bot being added there, but they don't appear in people's DMs.
I'm using the latest versions of discord.js and nodejs, the commands are separated from their Index.js and it logs them correctly instantly, but they don't appear in the DMs.:crySparkle:
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!you need to set the proper contexts, including private dm
I have the: setDMPermission(true)
thats not the correct way, no
Oh
So that was the problem?
yes
So: setContexts(['Guild', 'BotDM'])?
Or how would it be, can you give me an example?
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
I just understood and it works now, thanks