title: How to get the last message of a specific channel discordjs
body: <p>I'm trying to get the last message of a specific channel but I've couldn't do that, I want that if i write a command in another channel (Channel 1) that command gives me the last message of another channel (channel 2).</p>
  
  <p>My code is:</p>
  
  <pre><code>client.on('message', (message)=&gt;{
      if(message.channel.id === '613553889433747477'){
          if(message.content.startsWith('start')){
  
                  message.channel.fetchMessages({ limit: 1 }).then(messages =&gt; {
                      let lastMessage = messages.first();
                      console.log(lastMessage.content);
                    })
                    .catch(console.error);
          }
      }
      });
  </code></pre>