Bot in GC
How do I get my bot to work within both servers and group chats? It was working before but after I changed smth (I forget what) it's slash commands don't work in dms or group chats anymore
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 OPdiscord.js is 14.16.3
node is 20.17.0
use the
InteractionContextType.BotDM
contextWould I be able to do BotDM, Guild, and Private Channel or am I only able to pick one?
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
oh it's PrivateChannel mb, but you can set any or all of them
How would I do this?
by passing the desired ones to the setContexts method
Thanks! It works now!