Search code examples
c#botframework

Bot Framework: Exit PromptDialog without giving an answer


I ask the user a yes/no question using:

PromptDialog.Confirm(context, AfterChoice_OpenServiceRequest, "Do you want to open a service request?");

to which the user can give a yes/no answer. But, what if the user doesn't want to answer to this at all and rather, ask a different question? Until and unless the user replies with a yes/no, it keeps asking them the same question for 'n' number of times.

I could pass n=0 to attempts parameter, but that would still require the user to answer with a yes/no at least once before being able to ask something else.

Could the user not just proceed and ask something else in response? How can I handle this?


Solution

  • Until the release of the feature mentioned by Lars, the only option is to create a new class that would inherit from PromptDialog, or implement your conversation logic manually.