deferUpdate while waiting for api response
After the initial CommandInteraction, I .deferReply while I wait for an api response, then I .editReply once it's complete.
I then have a ButtonBuilder attached that allows the data to refresh. So I .deferUpdate while the data is refreshing, then I .update once complete.
My issue is that it fails on the .deferUpdate as .deferReply has already been called.
Is there a way to resolve this?
(The API is external and sometimes takes more than 3 seconds to resolve, so the interaction times out if the .deferUpdate is not called)
2 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok, so I believe I have fixed it by:
Some one correct me if this is the wrong approach