title: JavaScript Discord How can the message be detected on a server and on the channel, on a specific channel?
body: <p>I want the bot to detect a message from a server and send it to my personal server, in a specific channel. How do I make that code and how do I incorporate it into mine?</p>
  
  <p>MY CODE</p>
  
  <pre><code>const Discord = require('discord.js');
  const client = new Discord.Client();
  const token = 'xdd';
  
  client.login(token); // login the bot with your token.
  
  client.on('message', message =&gt; {
  
          if(message.content.toLowerCase() === 'help')
                  message.channel.send("hello " + message.author + "!");
          else if(message.content.toLowerCase().includes('time'))
          {
                  var date = new Date();
                  message.channel.send('The time is ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds());
          }
  
  });
  </code></pre>