title: How to make a discord.js bot say custom messages in a specific channel & tag a user in a message
body: <p>So, I wanted to create my own discord server for my friends and me, and I wanted it to have some bot features... So I got into coding.. long story short I messed it up and after hours of trying to find the solution I gave up.</p>
  <p>The first one is a word filter, works perfectly fine, I just cannot tag anyone.. It's supposed to delete the message that's said and give out a message, just like &quot;@example, don't say that!&quot;</p>
  <pre class="lang-js prettyprint-override"><code>client.on('message', async(msg) =&gt; {
      
      if(msg.author.bot) return;
      if(!msg.guild) return;
  
      var array = ['example1, 'example2'];
  
      if(!msg.member.hasPermission('MANAGE_MESSAGES')){
          if(array.some(w =&gt; ` ${msg.content.toLowerCase()} `.includes(` ${w}`))){
              msg.delete();
              msg.channel.send(`${client.user.tag}`)
              return;
          }
      }
          
  });
  </code></pre>
  <p><strong>My second problem:</strong>
  I tried creating a command that every time you type in <code>(prefix)say + &quot;text&quot;</code> on Discord, the bot will say that message. the best would be if it's possible that you type in all the commands in ONE text-channel and have the ability to choose to what channel I want the bot to type that message too. the simple variant would be fine aswell for me. here is my code:</p>
  <pre class="lang-js prettyprint-override"><code>const isValidCommand = (message, cmdName) =&gt; message.content.toLowerCase().startsWith(prefix + cmdName);
  
  require('dotenv').config();
  
  client.on('message', function(message) {
      if(message.author.bot) return;
  
      else if(isValidCommand(message, &quot;say&quot;)) {
          let marketing = message.content.substring(5);
          let marketingchannel = client.channels.cache.get('766732225185054740');
          let logsChannel = client.channels.cache.find(channel =&gt; channel.name.toLowerCase() === 'logs');
          if(logsChannel)
              logsChannel.send(marketing);
      }
  });
  </code></pre>
  <p>I really hope that I will get it to work..</p>
  <p>Thanks in advance!</p>