what causes a bot to not give a role discord.js 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);