title: How to make a discord bot send a picture you sent to it via dm to a certain channel
body: <p>So I kept thinking about this piece of code. The logic behind it is "you send the bot a screenshot via DM (direct message) and the bot is supposed to take that picture and put it to a certain channel that exists in a certain server (probably with id). The problem starts when I tell it to send the file, it just stops without an error happening on the console, sometimes it shows the answer "you successfully sent a screenshot" sometimes it does not. It is clear to me that it has a problem to realize that I am sending a picture instead of plain text, I guess?.</p>
  
  <p>at this point, I am kinda stuck with not many options. (by the way, this block of code is attached on an "event")</p>
  
  <pre><code>client.on("message", message =&gt; {
  message.author.send("Please send a screenshot");
  const collector = new Discord.MessageCollector(message.channel, m =&gt; m.author.id === message.author.id, {});
  console.log(collector)
  collector.on('collect', message =&gt; {
      if (message.attachments.size &gt; 0) {
  
          message.channel.send("You successfully sent a screenshot")
          console.log(`Collected ${message.content}`)
          client.channels.get(`628607857662623745`).send(message.content);
  
      } else if (message.attachments.size &lt; 0) {
          message.channel.send("you did not");
  
      }   
  </code></pre>
  
  <p>})</p>
  
  <p>The bot is just required to send ONLY pictures you send it via DMs to a certain channel on discord.</p>