title: How to access the User object?
body: <p>I'm using discord.js for my bot, and I want to use <a href="https://discord.js.org/#/docs/main/stable/class/User" rel="nofollow noreferrer">the User object</a> to get the ID from that. However, the docs aren't very specific on how to use that. How do you get an object for a specific user?
  <hr>
  On a side note, I'm also new to node.js, so maybe there's just some giant similarity in node.js stuff that I'm not familliar with.</p>
  
  <p>My code: </p>
  
  <pre><code>const Discord = require("discord.js");
  const client = new Discord.Client();
  var kingdoms = [];
  var ids = [];
  const Kingdom = function(name, id){
      this.name = name;
      this.aa = 1;
      this.da = 1; 
      this.attackDate = 0;
      this.exhausaa = 0;
      ids.push(id);
  };
  client.on('ready', () =&gt; {
    console.log(`Logged in as ${client.user.tag}!`);
    client.user.setGame("k^help");
  });
  
  client.on('message', msg =&gt; {
    console.log(msg);
    console.log(msg.content.trim().indexOf('k^addkingdom'));
    if (msg.content.trim() == 'k^help') {
      msg.channel.send({embed:
          {
              description: 'Note: All things in brackets must be replaced and are parameters.',
              fields: [{
                  name: "k^help",
                  value: "Displays this message."
              },
              {
                  name: "k^addkingdom [name]",
                  value: "Adds a kingdom to the database named [name]. One per person only."
              }]
          }
      });
    }
    if (msg.content.trim().indexOf('k^addkingdom ') == 0) {
      //if(ids.contains(msg.GuildMember.id)){
      //  msg.reply("You already have a kingdom!");
      //}
      var content = msg.content;
      content = content.replace('k^addkingdom ', '');
      content.trim();
      msg.reply("Kingdom " + content + " added!");
      kingdoms.push(new Kingdom(content/*, msg.GuildMember.id*/));
    }
  });
  
  client.login('Hidden for privacy');
  </code></pre>