duplicate messages with role mentions - second message gives HTTPError [AbortError]: The user aborted a request. #1030
-
Describe the bug i have a message sent to a channel ( HTTPError [AbortError]: The user aborted a request.
...stack trace... the mentions work. the content all renders fine. it just gets duplicated. the message has the following shape:
{
content: "@everyone",
embeds: [...]
} the first embed also includes a role mention in its
new MessageEmbed()
.setDescription(
`${roleMention(someRole.id)} get ready!`,
)
... To Reproduce unfortunately i cant reproduce this on my test server (identical code its just only me or at most 5-10 people i bring it for testing). it only happens in the real one. Screenshots Additional notes subsequent times the message is sent (same message content, same channel, same server) do not have this issue. server details where it happens: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
here is a screenshot if it helps. you can see the role mention is working (orange role - orange glow) |
Beta Was this translation helpful? Give feedback.
-
Update: moved the role mention to the content field to fix separate a notification bug. Still duplicating though. I've logged throughout the code and there's no duplicate calls being made. Really at a loss. |
Beta Was this translation helpful? Give feedback.
-
do you have any advice on how to debug this? as i mentioned i have checked all of my code and no calls are being duplicated. but maybe there are some events i can hook into to see whats happening. |
Beta Was this translation helpful? Give feedback.
-
hey guys i figured this out. what happened was my message builder returned a promise (because inside it i was making some other reqs to populate data). what i had was return channel.send(await buildMessageX(...)) i moved it to be const messageX = await buildMessageX(...);
return channel.send(messageX) and the issue went away. sorry for all the commotion |
Beta Was this translation helpful? Give feedback.
hey guys i figured this out. what happened was my message builder returned a promise (because inside it i was making some other reqs to populate data).
what i had was
i moved it to be
and the issue went away. sorry for all the commotion