title: Discordjs: how to listen for messages on a specific channel
body: <p>I am building a discord bot to listen to messages on a specific channel. The issue is that my code listens to all channels.</p>
  <p>Even if I use a condition to check for the channel id before picking the message, it means it will do more work than is necessary.</p>
  <p>I want to avoid the case of selecting messages from multiple channels and just concentrate on the messages in the channel I want to listen to.</p>
  <pre><code>require('dotenv').config();
  
  const { Client, Intents, Collection } = require('discord.js');
  const {TOKEN, CHANNEL_ID} = require('./src/config/index');
  
  const client = new Client({
    intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
    
  });
  
  client.once('ready', (c) =&gt; {
    console.log(`Ready! Logged in as ${c.user.tag}`);
  });
  
  client.on('messageCreate', async (message) =&gt; {
    console.log(message)
  })
  
  
  client.login(TOKEN);
  </code></pre>
  <p>This code above is the current code I am using</p>