[AbortError]: Request aborted

ok so when channel.send(etc...) returns an [AbortError]: Request aborted, it acrtually sends the message up to 3 times sometimes twice the channel. Further more, when channel.send(etc...) is ran and before it sends the message, if i stop the bot and restart it, it will persist sending the message it was sending before i stopped the bot. Why? How do i prevent that? Here is the piece of the code:
const attachmentToSend = new AttachmentBuilder(filePath);
await channel.send({ files: [attachmentToSend] }).catch(error);
const attachmentToSend = new AttachmentBuilder(filePath);
await channel.send({ files: [attachmentToSend] }).catch(error);
2 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Lawa
LawaOP9mo ago
I know it's an internet connectivity issue, i'm testing it witha limited bandwith for personal puposes, but i expecting when the channel.send() returns an AbordError to stop trying to send the message, but that's not the case.
Want results from more Discord servers?
Add your server