title: Discord js: Selecting a random user from users who posted right answer in a channel
body: <p>This is my first Discord bot and I am stuck.
  I want this bot to pick a winner for a quiz.</p>
  
  <p>So, I am trying to fetch all messages with correct answer from a random user.
  However the following code does not pick up a user with right answer.</p>
  
  <p>Could you please tell me how I should do this??</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>       const chan = message.channel;
         const answer = 'test';
     
         //Select a random user
         const user = message.channel.members.random();
         const userid = user.id
  
        //fetch messages from the user and contains answer
        chan.fetchMessages().then(messages =&gt; {
             const usermsgs = messages.filter(
                    m =&gt; m.author.id === `${user.id}` &amp;&amp;  
                         m.content === answer);
                
          //check if the answer is in the messages
          if(usermsgs){
              message.reply('winner is' + `${user.user}`);
          }else{
              message.reply('No Winner');
          }
          
        }).catch(console.error);</code></pre>
  </div>
  </div>
  </p>