title: Discord.js Bots // Say Command
body: <p>I've coded a &quot;say command&quot; that's supposed to execute a message every time I type in -say.
  It's working fine, I just want the prefix to be set to  &quot;?&quot; instead of &quot;-&quot; only for that one command, the other ones are supposed to be set to the main one (&quot;-&quot;). On top of that I want it to <em>delete the command</em> after typing it in, so all that remains is the message <code>[(e.g ?say hello --&gt; (delete &quot;?say hello&quot; --&gt; send message &quot;hello&quot; to text channel)].</code>  I also want to <strong>specify</strong> the text channel in my command, instead of just setting it to send the messages only to one specific channel <code>[e.g -say (message) (text channel)]</code> It would also be pretty cool if it said something like &quot;Done.&quot; and deleting that confirmation after ~5 sec.</p>
  <p>So here is the code:</p>
  <pre><code>client.on('message', function(message) {
  
      if(message.author.bot) return;
  
      else if(isValidCommand(message, &quot;say&quot;)) {
  
          let sendMessage = message.content.substring(4);
  
          let sendChannel = client.channels.cache.get('767374258492932106');
  
          sendChannel.send(sendMessage)
      }
  });
  </code></pre>
  <p>In the following I will show you my not working code, trying to set the prefix to &quot;?&quot; but it didnt execute, only saying &quot;declaration or statement expecting and missing or wrong punctuation..</p>
  <pre><code>client.on('message', function(message) {
      if (['?'].every((prefix) =&gt; {
      if (!message.content.startsWith(prefix) || message.author.bot) return;
  
      else if(isValidCommand(message, &quot;say&quot;)) {
  
          let sendMessage = message.content.substring(4);
  
          let sendChannel = client.channels.cache.get('767374258492932106');
  
          sendChannel.send(sendMessage)
      }
  });
  </code></pre>
  <p>It'd be really grateful if someone helped me with this. Thank you!</p>