I'm currently creating a bot through Discord.js, and I want someone to be able to state a command in order to gain a role. However, I can't figure this out for the life of me.
In my bot folder, I've created an addrole.js file with the following chunk of code:

```js
const Discord = require("discord.js");
const roles = message.guild.roles.cache.map((role) => role);
const member = message.mentions.members.first();
const role = message.mentions.roles.first();
const colours = require("../colours.json");

module.exports.run = async (bot, message, args) => {
  if (!message.member.hasPermission(["MANAGE_ROLES", "ADMINISTRATOR"]))
    return message.channel.send(
      "Sorry, frog lover! :disappointed: :broken_heart: You don't have permission to perform this command!"
    );

  let rMember =
    message.mentions.members.first ||
    message.guild.members.cache.find((m) => m.user.tag === args[0]) ||
    message.guild.members;
  let role =
    message.guild.roles.cache.find((r) => r.name == args[1]) ||
    message.guild.roles.cache.find((r) => r.id == args[1]) ||
    message.mentions.roles.first();
  if (!role)
    return message.channel.send(
      "Which role do I give to this user, frog lover? :point_right: :point_left:"
    );

  if (!message.guild.me.hasPermission(["MANAGE_ROLES", "ADMINISTRATOR"]))
    return message.channel.send(
      "Sorry, friend :broken_heart: :shrug: I don't have permission to perform this command!"
    );

  if (rMember.roles.has(role.id)) {
    return message.channel.send(
      `$rMember.displayName), already has this role!`
    );
  } else {
    await rMember.roles.add(role.id).catch((e) => console.log(e.message));
    message.channel.send(
      `The role ${role.name} has been added to ${rMember.displayName}.`
    );
  }

  let embed = new Discord.RichEmbed()
    .setColor(colours.redlight)
    .setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL)
    .addField("Moderation:", "Addrole")
    .addField("Mutee:", rMember.user.username)
    .addField("Reason:", reason)
    .addField("Date:", message.createdAt.toLocaleString());

  letsChannel = message.guild.channels.cache.find(
    (c) => c.name === "beans-the-frog"
  );
  sChannel.send(embedVariable);
};

module.exports.config = {
  name: "addrole",
  description: "Adds a role to a member of the guild!",
  usage: "beans addrole",
  accessableby: "Moderators",
  aliases: ["ar", "roleadd"],
};

```

I followed THIS tutorial to get here: <https://www.youtube.com/watch?v=GCSbZ2UbriU>

I've given my bot the Manage\_Roles permission and have attempted to state both "beans addrole (role) (user)" and "beans addrole (user) (role)". I'm expecting him to even specify error messages, or even better yet, add the role. However, he isn't even spitting out error messages, and neither is my console. Everything else works fine, it's just that this particular function won't work. Any input/feedback would help a LOT.