title: Discord Bot JS - How do I append a role to a specific discord tag?
body: <p>Im currently programming a bot for my discord and I want a command that my mods can write that appends a mute role to a specific player. Currently they type /mute with the discord tag straight after (for example /muteDanyboy#8473) and the discord tag is saved in a variable called commandsplit (as "Danyboy#8473").
  How do I target that discord tag and append the mute role to that user?</p>
  
  <p>I use discord.js to program.
  Line 23 is the part im looking to get working, thanks.</p>
  
  <pre><code>const Discord = require("discord.js");
  const TOKEN = "MyToken"
  const PREFIX = "/timeout24"
  var bot = new Discord.Client();
  const COMMAND = "/mute"
  
  /*Confirms the bot is active */
  bot.on("ready", function(){
      console.log("Bot Active");
  });
  
  /*Gives new members the "Member" role */
  bot.on("guildMemberAdd", function(member) {
      member.addRole(member.guild.roles.find("name", "Member"))
  });
  
  /*The mute command */
  bot.on("message", function(message) {
      if(message.author.equals(bot.user)) return;
      if(!message.content.startsWith(COMMAND)) return;
      var commandsplit = message.content.substring(COMMAND.length).split(" ");
  
      commandsplit.id.addRole(message.guild.roles.find("name", "Muted"))
  
  })
  bot.login(TOKEN);
  </code></pre>