Await the execution of code and then move to next ...
# 🤝help
p
Is this how Botpress works? In the code template I'm using, I have a timeout function set for 5 seconds, but Botpress is jumping to the next card before the timeout completes. I want to make Botpress wait until the timer finishes before moving to the next card. How can I achieve this?
w
What’s the code you are using ?
p
There is button i want to wait for 15 seconds if user didn't respond move to next card
w
I will have a look in the next hours 😉
Maybe someone else will answer before me
p
sure no problem.
w
this is what you try to do in the template you've shared ?
p
yes kind of, but i has wait for settimeout to complete so that text gets printed
w
okay
the thing is, the principle is to play the cards one after the other
p
away can i stop the card from execution?
w
so it's difficult to execute code while the bot is waiting for a response
or even impossible
p
okay
w
if you have a "capture information" card, you need to wait for the user response
but that's a feature that is often requested !
i have just posted a post in feature request : #1246069088250368002
but maybe it can be done in another way !
45 Views