title: My bot is responding to all prefixes and I don't know why
body: <p>I am using the latest node.js and discord.js versions and I am coding on VSC.
  My bot started responding to all prefixes and I don't know why. The code I have currently:</p>
  <pre><code>const Discord = require('discord.js');
  const client = new Discord.Client();
   
  const fs = require('fs');
  
  client.commands = new Discord.Collection();
  
  const commandFiles = fs.readdirSync('./commands/').filter(file =&gt; file.endsWith('.js'));
  for(const file of commandFiles){
      const command = require(`./commands/${file }`);
  
      client.commands.set(command.name, command)
  }
  
  const PREFIX = '$';
   
   
  client.on('ready', () =&gt; {
      console.log('updated');
  })
  
  client.on('message', message =&gt; {
   
      const args = message.content.substring(PREFIX.length).split(&quot; &quot;);
  
      switch (args[0]) {
          case 'ping':
              message.channel.send('pong!');
              break;
      }
  });
   
          client.login(token);
  </code></pre>
  <p>However, with this code in mind, the bot still responds to any prefix. In the image below, I sent the ping command with various random letters and symbols in all at the same time. The bot responded pong to all of them.</p>
  <p><a href="https://i.stack.imgur.com/kHhii.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kHhii.png" alt="Image of the bot not working" /></a></p>
  <p>not sure what is wrong as I am still new to discord.js but I cannot figure it out.</p>