How can i make an add role command
im using slash commands so how can i add a command that adds a specific role to a defined user?
and i use a const commands array to register / commands
6 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!Create the command with two required options, user name and role to add, in the interactionCreate get the user from the option and add the role from the option to the user
What would the code look like for thay
The get user and add role
This is a example code how you setup options
This explains everything pretty well
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
alr thanks ill try it