node.js - Cancel builder.Prompts.choice() -


my bot has prompt asks user input:

builder.prompts.choice(session, "is ok?", ["yes", "no"]); 

now, when user responds else other "yes" or "no" program reply with:

i did not understand. please choose option list 

with same choices before.

i bot not ask input again if user types else other "yes" or "no" (and reset prompt stack so).

you can change maxretries option prompt shown (default infinite)

builder.prompts.choice(session, "is ok?", ["yes", "no"],maxretries:'2');  

you can see iprompt options in mentioned url

https://docs.botframework.com/en-us/node/builder/chat-reference/interfaces/_botbuilder_d_.ipromptoptions.html


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -