#Attachment Images erroring

1 messages · Page 1 of 1 (latest)

upper cedar

Hi, I am currently using the AttachmentBuilder to attach a URL to a .edit({}) function

const file = new AttachmentBuilder(attachment);
await replyInteraction.edit({
      content: message,
      files: [file],
    });

The URL I am passing to (attachment) works perfectly fine in the browser, But it seems a lot of the time discord is showing it as a file instead of the image in the message and upon clicking the file it does not work and I get a This site can’t be reached might be temporarily down or it may have moved permanently to a new web address.. It works about 50% of the time fine.

Has anyone ever had this problem and if so I would love it if you could point me in the right direction.

Thanks for you time.