Hi, I'm encountering an issue where I cannot send an image file without getting a "HTTPError [AbortError]: The user aborted a request." I read through this thread https://github.com/discordjs/discord.js/issues/3471, but increasing the retry limit didn't help. Does anyone have an idea of how I can fix this? Here is my code
#Issue with sending an image file
1 messages · Page 1 of 1 (latest)
MessageEmbed#attachFiles has been removed. Files should be attached via the message option object instead:
const attachment = new MessageAttachment('./image.png', 'image1.png');
const embed = new MessageEmbed()
- .attachFiles([attachment])
.setTitle('Attachments')
.setImage(`attachment://${attachment.name}`);
- channel.send(embed)
+ channel.send({
+ embeds: [embed],
+ files: [attachment]
+ });
Will try that, thanks