title: Discord.js Send message to a specific channel using a bot
body: <p>I have been trying to <strong>send message to a specific channel</strong> using the <strong>discord bot</strong> and i have tried a lot of online examples that are present online but none of them works and gives the same error everytime.<br>
  The following is the code implementation:</p>
  
  <pre><code>client.on('ready', () =&gt; {
    console.log('Bot is now connected')
    try {
      client.channels.find('test').send("Hello there!");
    } catch (e) {
      console.log('[ERROR:]',e);
    }
  });
  </code></pre>
  
  <p>But everytime the same error message appears:</p>
  
  <pre><code>[ERROR:] TypeError: client.channels.find is not a function
      at Client.client.on (/Users/Kartikeya 1/discordBot/index.js:9:34)
      at Client.emit (events.js:198:13)
      at WebSocketManager.triggerClientReady (/Users/Kartikeya 1/discordBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:433:17)
      at WebSocketManager.checkShardsReady (/Users/Kartikeya 1/discordBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:417:10)
      at WebSocketShard.shard.on.unavailableGuilds (/Users/Kartikeya 1/discordBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:199:14)
      at WebSocketShard.emit (events.js:198:13)
      at WebSocketShard.checkReady (/Users/Kartikeya 1/discordBot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:466:12)
      at WebSocketShard.onPacket (/Users/Kartikeya 1/discordBot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:438:16)
      at WebSocketShard.onMessage (/Users/Kartikeya 1/discordBot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
      at WebSocket.onMessage (/Users/Kartikeya 1/discordBot/node_modules/ws/lib/event-target.js:120:16)
  </code></pre>
  
  <p>Could anyone please let me know what step is missing or not handled.<br>
  I am using the following node version : <strong><em>v10.16.3</em></strong></p>