title: discord.js check if a particualr user ID has a particular role ID
body: <p>I have some code which I want to; get all the users with a particular role (their 'team'). Then for each of those users in the particular team I want to investigate some of the other roles they have.</p>
  <p>I have the teams (roles) in an arrary, so I can loop through each team.</p>
  <pre><code>//pop a role to work with for this loop
  const therole = teams.pop();
  
  //find role for this loop
  const Role = message.guild.roles.cache.find(role =&gt; role.name == therole );
  
  //filtered by those with therole for the loop, fill members array with users ids with that role
  const Members = message.guild.members.cache.filter(member =&gt; member.roles.cache.find(role =&gt; role == Role)).map(member =&gt; member.user.id);
  </code></pre>
  <p>At this point I now have an arrary Members which contains the member ids of the users with role 'therole'. This part works.</p>
  <p>What I then want to do for each of the member ids stored in the Members arrary is lookup that member and check if they have various other roles (for example, I have a timezone role).</p>
  <p>So I start a loop</p>
  <pre><code>for (var i=Members.length; i--;){
  </code></pre>
  <p>but I am stuck on how to lookup the member by the ID in the Members arrary and check if they have another role. The closest I have got is;</p>
  <pre><code>var haseurope = message.member.roles.cache.some(r =&gt; r.name === 'Europe');
  
  //Debug log
  console.log(i + ' The member is:' + Members[i]);        
  console.log(i + ' Has Europe is:' + haseurope); 
  </code></pre>
  <p>The Members arrary is 6 IDs long and sometimes I can get the haseurope to equal true 6 times, sometimes false 6 times depending on how I define haseurope variable. The above example logs (IDs anonomoised);</p>
  <pre><code>app[worker.1]: 5 The member is:684896007655557000
  app[worker.1]: 5 Has Europe is:true
  app[worker.1]: 4 The member is:489439004133708000
  app[worker.1]: 4 Has Europe is:true
  app[worker.1]: 3 The member is:110047003303981000
  app[worker.1]: 3 Has Europe is:true
  app[worker.1]: 2 The member is:589135008044626000
  app[worker.1]: 2 Has Europe is:true
  app[worker.1]: 1 The member is:218202002409912000
  app[worker.1]: 1 Has Europe is:true
  app[worker.1]: 0 The member is:341509003306030000
  app[worker.1]: 0 Has Europe is:true
  </code></pre>
  <p>I think what is happenening is that when I am running <code>message.member.roles.cache.some(r =&gt; r.name === 'Europe');</code> the member part is not changing for each itteration of the loop. I don't seem to be able to do something like this though;</p>
  <pre><code>message.Members[i].roles.cache.some(r =&gt; r.name === 'Europe');
  </code></pre>
  <p>How can I check; &quot;For each ID in the Members arrary, does this user ID have the 'Europe' role?</p>
  <p>Thanks everyone for your help!</p>