title: Displaying all users in Discord channel
body: <p>Right now I am working on a Discord bot and am attempting to list all users that are currently connected to the "general" voice channel.</p>
  
  <p>My main issue right now is that my code is able to realize the number of people in the voice channel, but all of the "member" objects are undefined. This is both the console outputs and code. I have searched everywhere and can't seem to find anything.</p>
  
  <p><strong>This is the output from the console, the three "undefined" logs are the current users in the voice channel:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/KfR3I.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KfR3I.jpg" alt="enter image description here"></a></p>
  
  <p><strong>This is the code I have written:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/9sdco.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9sdco.jpg" alt="enter image description here"></a></p>
  
  <p>For convience, this is also the code...</p>
  
  <pre><code>var chan = bot.channels['363589387411259396'];
  var mems = chan.members;
  for (var x in mems) {
    console.log(x.userID);
  }
  return 'ANYTHING';
  </code></pre>
  
  <p>Any inputs helps, thanks!</p>