add role to guild member using discord id discord.js code example
Example 1: 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);
Example 2: add role to channel discord.js
channel.updateOverwrite(channel.guild.roles.everyone, { VIEW_CHANNEL: false });