How to defer a button without losing the loading animation?

Hello, I have a button interaction which will take some time to process. Is it possible to use deferUpdate while still showing the loading animation on the button? Currently when I do it, the button stops loading and stays still till it gets updated.
6 Replies
d.js toolkit
d.js toolkit10mo 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!
Retropod
RetropodOP10mo ago
My issue is, I want the button to keep "loading" till I update the interaction.
probablyraging
probablyraging10mo ago
Pretty sure the max amount of time it will stay in the loading state for is 3 seconds, I have a feeling that is just a client side animation
Retropod
RetropodOP10mo ago
Oh, okay Thank you
.queen
.queen10mo ago
@Retropod a workaround is to defer the button, replace all components with a disabled loading button. And once you're ready to reply, you can followup or change the components back to normal The loading button can be just an animated emoji of a loading icon, it could just be labeled "..." or anything you'd prefer. As long as its disabled and conveys to the user that the bot is thinking,
Retropod
RetropodOP10mo ago
Oh yeah that sounds like it could work, thanks
Want results from more Discord servers?
Add your server