title: Discord Bot not responding after first command
body: <p>So I am having some issues with creating my bot. All I am trying to have it do, is keep track of a list of players that type the command "+me" to join a "waiting list", "-me" in order to be removed from the list, and "?list" in order to display the list. I plan to add other commands later. </p>
  
  <p>The issue I am having, is that the command works fine to add someone to the list, however after the first command the bot stops responding to commands. This leaves me able to add myself to the queue, but then not able to leave, no one else able to join, not able to list it, etc.
  Also if you could mention a way to move the for loop I am using to display the list into a seperate function I would greatly appreaciate it. I am new to Javascript and my attempts are crashing it for some reason.</p>
  
  <p><a href="https://i.stack.imgur.com/MVHoo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MVHoo.png" alt="Exmaple of issue"></a></p>
  
  <pre><code>const Discord = require('discord.js');
  const {prefix, token} = require('./config.json');
  const client = new Discord.Client();
  var rankedList = []; // Initialise an empty array
  
  client.login(token);
  
  client.once('ready', () =&gt;{
      console.log('Ready!');
  })
  
  client.once('message', message =&gt;{
      // Add to queue
      if(message.content.startsWith(`${prefix}me`)){
          console.log(message.author + "added to queue.");
          message.channel.send(message.author + " added to queue.");
  
          var temp = message.author;
          rankedList.push(temp);  // the array will dynamically grow
  
          // Show queue after adding
          //for (var i = 0; i &lt; rankedList.length; i++) {
          //  message.channel.send(i+1 + "- " + rankedList[i]);
          //}
          message.channel.send(`${rankedList.map((player,index) =&gt; `${index+1} - ${player}`).join('n')}`);
      }
  
      // Remove from queue
      if(message.content.startsWith(`-me`)){
          console.log(message.author + "removed from queue.");
          message.channel.send(message.author + " removed from queue.");
  
          for( var i = 0; i &lt; rankedList.length; i++){ 
              if ( rankedList[i] === message.author) {
                  rankedList.splice(i, 1); 
                  i--;
              }
          }
  
          // Show queue after removing
          for (var i = 0; i &lt; rankedList.length; i++) {
              message.channel.send(i+1 + "- " + rankedList[i]);
          }
      }
  
      if(message.content.startsWith(`?list`)){
          console.log(message.author + "displayed the queue.");
  
          // Show list
          for (var i = 0; i &lt; rankedList.length; i++) {
              message.channel.send(i+1 + "- " + rankedList[i]);
          }
      }
  })
  </code></pre>