title: How to log the attachment sent by the user in discord.js?
body: <p>I've been trying to code a discord bot that logs attachments that was sent by a user into an embed. I managed to log the URL of the attachment, but it doesn't show the actual image. Is there any way to log an image sent by a user into an embed? Any help with be appreciated.</p>
  <p><a href="https://i.stack.imgur.com/F215k.png" rel="nofollow noreferrer">An example</a></p>
  <p>My current code at the time:</p>
  <pre><code>const attachments = message.attachments.size ? message.attachments.map(attachment =&gt; attachment.proxyURL) : null
  
  let embed = new Discord.MessageEmbed()
  .setAuthor(message.author.username, message.author.displayAvatarURL({ dynamic:true }))
  .addField('Content', message.content)
  .addField('Channel', message.channel)
  .setTimestamp()
  .setColor('RANDOM')
  
  if(message.attachments.size &gt; 0) embed.addField('Image', attachments)
  </code></pre>