DEFERRED_UPDATE_MESSAGE should display a loading state #8112
Unanswered
lipfangmoe
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It's in the title. The
DEFERRED_UPDATE_MESSAGEacknowledgement should display a loading state, similar to whatDEFERRED_CHANNEL_MESSAGE_WITH_SOURCEdoes.Imagine you have an image gallery, with a string-select underneath. The problem is that the gallery needs to perform HTTP requests to third-party APIs in order to switch images, and those APIs tend to be a bit slow.
Since there's no guarantee on how fast the APIs are (often, they do end up exceeding 3 seconds), I send a
DEFERRED_UPDATE_MESSAGEright away, which allows me to use the Edit Original Interaction Response to update the message that the string select is attached to.However, I now have a new problem: I now have an unbounded wait, and when discord receives
DEFERRED_UPDATE_MESSAGE, the loading state is removed. So the user of my application has no indication that work is still being done.I guess a workaround would be to create an
UPDATE_MESSAGEresponse to edit the previous message to add a "Loading..." text display... but it'd be a lot more convenient ifDEFERRED_UPDATE_MESSAGEwould just work the same way thatDEFERRED_CHANNEL_MESSAGE_WITH_SOURCEdoes, leaving the loading indicator next to the string select until the Edit Original Interaction Response endpoint gets called.I noticed that #3766 has a similar complaint. I decided to make a new topic here since that one is more about reworking how
DEFERRED_UPDATE_MESSAGEshould work rather than just simply asking that it doesn't erase the loading indicatorBeta Was this translation helpful? Give feedback.
All reactions