title: Discord.js get user with only his ID whats saved inside a database
body: <p>When I send a message with a command, the bot must give a user with a special ID a different role. How do I do that if I only have the user's ID.</p>
  
  <p>the command message.guild.members.get(ID) is undefined</p>
  
  <p>This is the code that I use. const account = message.guild.members.get(key); doesn't work...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>exports.run = (Discord, bot, firebase, message, args, data) =&gt; {
  
    const axios = require('axios');
    // Call a Axios Request
    axios.get('https://api.guildwars2.com/v2/guild/' + data.GuildID + '/members?access_token=' + data.APIToken).then(response =&gt; {
      const data = response.data; // Put all response inside a variable
      const database = firebase.database().ref('discord/accounts/'); // Connect to firebase
      var int = 0; // Int for check if all uers are checked
      var insideguild = 0; // Int for how many are inside the guild
      var notinsideguild = 0; // Int for how many are remove from discord
      database.orderByChild("guild").equalTo(true).once('value', function(snapshot) { // Get all accounts from Firebase
        snapshot.forEach(function(snap) { // for each account do something
          const key = snap.key; // Get the name of the snapshot
          const value = snap.val(); // Get value of all accounts
  
          let guildwarsaccount = value.guildwarsaccount; // Get user Guild Wars Account
          let match = false; // True if user account is inside the Guild
          for (var i = 0; i &lt;= data.length; i++) { // do soming for each users inside the Guild
            if (i == data.length &amp;&amp; match == false) { // Do something when user is not inside the guild
  
              // Change database
              database.child(key).update({ // Set player status on guild false
                guild: false
              });
  
              // Reset nickname and rank
              const role_pixel_brother = message.guild.roles.find("name", "Pixel Brother"); // Check the Role ID for Pixel Brother
              const role_guest = message.guild.roles.find("name", "Guest"); // Check the Role ID for Guest
              const account = message.guild.members.get(key);
              account.setNickname(account.user.username);
              account.addRole(role_guest).catch(); // Give the Role Guest
              account.removeRole(role_pixel_brother).catch(); // Remove the Pixel Brother
  
              notinsideguild++; // +1 If it is remove from guild
  
            } else if (i &lt; data.length) { // Loop each variable
              if (data[i].name == guildwarsaccount) { // Do something when user is inside the guild
                match = true;
                insideguild++; // +1 If it is the guild
              }
            }
          }
          int++; // +1 If the user is checked
          if(int == snapshot.numChildren()){
            const embed = new Discord.RichEmbed() // Make a success embed
              .setTitle("Success")
              .setDescription("Alle users zijn gechecked")
              .addField("Aantal gechecked", snapshot.numChildren(), true)
              .addField("Aantal verwijderd", notinsideguild, true)
              .setColor(65280)
              .setThumbnail("https://image.ibb.co/m49Ycn/success.png");
            message.channel.send({
              embed
            }); // Send success embed
          }
        });
      });
      }).catch(error =&gt; { // If an error occurs, this wil run
        const embed = new Discord.RichEmbed()
          .setTitle("Error")
          .setDescription("Helaas is er iets fout gegaan tijdens users check.")
          .setColor(16711680)
          .setThumbnail("https://image.ibb.co/eUF907/error.png");
        message.channel.send({
          embed
        }); // Send error embed
    });
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Someone a solution?</p>