Add a member to a role

Hi everyone! I am new to Discord.js. We have a system like this: Users become a member of the learning management system (Moodle). There are roles... The roles are the same as Discord roles... I have the nickname (or id) of the user and I know the role. I want to automatically register this user to a discord channel and assign the role automatically. I want him to see a welcome message when he comes to the channel. Is this system possible? Also, I couldn't assign the role, I tried this source: https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/understanding/roles.md#add-a-member-to-a-role However, I get an error like this: DiscordAPIError[50013]: Missing Permissions Thanks in advance for your help.
GitHub
discordjs-bot-guide/understanding/roles.md at master · AnIdiotsGuid...
The basic new coder friendly "idiot's guide", Created by Hindsight#2020 and maintained by the community. - AnIdiotsGuide/discordjs-bot-guide
7 Replies
d.js toolkit
d.js toolkit13mo ago
- 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!
treble/luna
treble/luna13mo ago
thats not the official guide, and outdated
d.js docs
d.js docs13mo ago
guide Home: What's new read more
treble/luna
treble/luna13mo ago
other than that, cant help you without code
thayit
thayitOP13mo ago
d.js docs
d.js docs13mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
thayit
thayitOP13mo ago
ok, trying to understand.
Want results from more Discord servers?
Add your server