title: Discord.JS bot - how can I include spaces in my command names?
body: <p>When I include spaces in my command names, those commands won't run. I'm using a command handler and in my <code>index.js</code> file, we have:</p>
  <pre><code>client.on('message', msg =&gt; {
      if (!msg.content.startsWith(prefix) || msg.author.bot) return;
      const args = msg.content.slice(prefix.length).trim().split(/ +/g);
      const commandName = args.shift().toLowerCase();
      const command = client.commands.get(commandName)
      || client.commands.find(cmd =&gt; cmd.aliases &amp;&amp; cmd.aliases.includes(commandName));
      if (!command) return;
      try {
      command.execute(msg, args);
      } catch (error) {
      console.error(error);
      msg.reply(&quot;I'm encountering an error trying to execute that command. Please try again.&quot;);
      }
      });
  </code></pre>
  <p>and in my <code>command.js</code> file, we have:</p>
  <pre><code>module.exports = {
      name: 'command name',
      execute(msg, args) {
      msg.channel.send(&quot;command&quot;);
      },
  };
  </code></pre>
  <p>When I change <code>command name</code> to <code>command-name</code> or to <code>commandname</code> it works! But when it's <code>command name</code>, my bot doesn't output any response... not even an error message. Where am I going wrong? Is there some simple solution or workaround that I'm overlooking? Thanks in advance.</p>