title: Sending private messages to user
body: <p>I'm using the discord.js library and node.js to create a Discord bot that facilitates poker. It is functional except the hands are shown to everyone, and I need to loop through the players and send them a DM with their hand.</p>
  
  <pre><code>bot.on("message", message =&gt; {
    message.channel.sendMessage("string");
  });
  </code></pre>
  
  <p>This is the code that sends a message to the channel when any user sends a message. I need the bot to reply in a private channel; I've seen <code>dmChannel</code>, but I do not understand how to use it. I have the username of the member that I want to send a message to.
  An example would be appreciated.</p>
  
  <p>Edit:
  After looking around for a user object, I found that I can get all of the users using the <code>.users</code> property of the client (bot). I will try using the <code>user.sendMessage("string")</code> method soon.</p>