#Edit two messages within the same button handler

3 messages · Page 1 of 1 (latest)

weary ravine
#

Hello, I have a button handler that will call an external API, send an embed, and edit another message embed too, depending on the first sent embed. What is the correct way to make "sleep" for like 2 seconds my bot before editing the second embed ? I want to avoid any risk of editing with wrong data if the API call is too long

haughty tundraBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
  • Marked as resolved by staff
slow knoll
#

just await your promises?