Can I set the slash only for those who have a certain role?
Is there any way for this to work and the slash only appears for those who have the defined position?
7 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!bots cannot set that
you may consider using https://discordjs.dev/docs/packages/builders/main/SlashCommandBuilder:Class#setDefaultMemberPermissions instead
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.
setting by users or carog id is not possible in any way?
well you can only via oauth2/discord ui
integrations > <bot> > commands
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Server admins can set it in Server Settings > Integrations > The Bot > The Command > Permissions