title: How to fetch all members of a large guild discord.js
body: <p>I am trying to fetch the ids of all members of a large guild. This guild has around 2000 people in it. I am using this:</p>
  
  <pre><code>const list = client.guilds.get("id"); 
  list.fetchMembers().then(r =&gt; {
  
      r.members.array().forEach(r =&gt; {
      let userid = r.id        
      msg.channel.send(userid)
      })
  });
  </code></pre>
  
  <p>It works for my test guild of 3 people but once I try it with the large guild, I get this error</p>
  
  <pre><code>(node:8632) UnhandledPromiseRejectionWarning: Error: Members didn't arrive in time.
  at Timeout._onTimeout (c:\Users\Han75\Documents\bot\node_modules\discord.js\src\client\Client.js:436:7)
  at listOnTimeout (internal/timers.js:531:17)
  at processTimers (internal/timers.js:475:7)
  </code></pre>
  
  <p>I know its because of a timeout. How do I stop this?</p>