title: How to get username/userID in slack bot
body: <p><a href="https://github.com/DeronLee/starbot.git" rel="noreferrer">https://github.com/DeronLee/starbot.git</a></p>
  
  <p>I created a slack bot and it worked fine. But when somebody sends message to the bot,  I'm not able to tell who sent it.</p>
  
  <p>I tried <code>msg.user msg.username</code>, but all of them are undefined.</p>
  
  <p>I just want my output to look like this</p>
  
  <pre><code>abc: @starbot hello
  starbot: hello. abc 
  </code></pre>
  
  <p>finally. I got it.</p>
  
  <pre><code>    slack.users.info({
      token: config('SLACK_TOKEN'),
      user: msg.user
    }, (err, data) =&gt; {
      if (err) throw err
      var text = makeMessage.makeMessage(msg.text, data.user.name);
      sendMessage.send(msg, text, slack);
  </code></pre>