discord.js give role to user id code example
Example: how to give a role to a new member in discord.js
var role = message.guild.roles.find(role => role.name === "MyRole");
message.member.addRole(role);
var role = message.guild.roles.find(role => role.name === "MyRole");
message.member.addRole(role);