0
Q:

get discord.js role

let role = message.guild.roles.cache.find(r => r.id === "Role ID");

// The member you want to add the role to
let member = message.mentions.members.first();

// Add role to the member
member.roles.add(role);

// Or add it to yourself
message.author.roles.add(role);
3
let role = message.guild.roles.find(r => r.name === "Role Name");

// Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name):
let member = message.mentions.members.first();

// or the person who made started the command: let member = message.member;

//adds the role
member.roles.add(role)
6

New to Communities?

Join the community