title: TypeError: Cannot read property 'members' of undefined for Discord.js
body: <p>I'm trying to reference all the members in a discord server. It's supposed to log all of the members in the console. Though, it says that <code>members</code> is not defined. How do I define it?</p>
  
  <pre class="lang-js prettyprint-override"><code>bot.on('message', message =&gt; {
    if (message.content.startsWith('!check')) {
  
      const list = bot.guilds.cache.get("335507048017952771");
  
      list.members.forEach(member =&gt; console.log(member.user.username));
  
      if (member) {
        for (user of list.members) {
          console.log(user[1].username);
        }
      }
  
    }
  })
  </code></pre>