How to get user details and give him a role by his "User ID"
How to get user details and give him role by his "User ID"
I tried a lot but not working
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!
- β
Marked as resolved by OPOkay 1m
Nitro Needed to send code π
let me record a video
why?
can I send it to you as DM?
https://sourceb.in/c6kFIDLnnN
there ^
ok let me check
node:events:492
throw er; // Unhandled 'error' event
^
TypeError: Cannot read properties of undefined (reading 'add')
When try
member.roles.add(role);
So member.roles = undefined
guild.members.fetch("ID")
I have post names User: <@ID>
So I used channelName.slice(8,-1)
let me send you the line
let me check
Thank you!!
works
I missed waiting for the command to end
Much love to you