I'm trying to create a bot that sends a direct message to a random slack user. The first step I am trying to accomplish is console.logging the list of users.
Here is what I have so far:
controller.hears('marco', 'direct_message', function(bot, message) {
  bot.api.users.list({user: message.user}, function(err, list){
    bot.reply(message, "polo");
    console.log(bot.api.users.list);
  })
});
When I direct message the bot marco, it replies polo and [Function] is logged. How am able to log some real data? I tried bot.api.users.list.members, but it logs as undefined. Thank you.