Skip to content

Send and delivery order #1071

Answered by almostSouji
suntong asked this question in Q&A
Discussion options

You must be logged in to vote

Discord.js sends REST commands off to the API, which handles them and propagates the sent message to clients via the websocket. As soon as the REST request resolves, discord.js will update the cache and send the next message. The REST API response may resolve before the messages can be propagated and arrive at your client.

This may or may not be solved by reloading the client, in which case messages are fetched and sorted by their creation time (included in the message-id - snowflake). If it is not solved after a refresh that'd imply that the sequence of message creation is broken at the API level. Theoretically this could still result in the observed behavior, if the text messages is qui…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by almostSouji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1063 on March 25, 2022 06:59.