PromptDialog.Confirm issue with emulator
Hi Team, Recently i see a problem with PromptOptions class when passed as a parameter to PromptDialog.Confirm. It is not taking the PromptStyler value when PromptOptions is passed as a parameter. Also the next overloaded method Confirm (IDialogContext context, ResumeAfter< bool > resume, string prompt, string retry=null, int attempts=3, PromptStyle promptStyle=PromptStyle.Auto) doesnot have the parameter to pass tooManyAttempts attribute value. My problem is that, i have to display a text when user exceeds the number of attempts. If i use the first mentioned Confirm methord which takes PromptOptions as the argument it is not evaluating the PromptStyler and so not showing the (Yes/No) string to the user. And if i am using the next overloaded method of Confirm it doesn't have the option to pass tooManyAttempts value as parameter. Please help!!!
You can pass in the PormptStyler to the constructor of PromptOptions: https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Dialogs/PromptDialog.cs#L157
and then use the following static helper to create your prompt dialog: https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Dialogs/PromptDialog.cs#L307
Hi, I am following the same set of code. But it is not evaluating PromptStyler constructor.
PromptOptions<string> PromptOptions = new LUISLogic().GetPromptOption("Are you satisfied with the answer?");
PromptDialog.Confirm(context, FeedbackConfirm, PromptOptions);
public PromptOptions<string> GetPromptOption(string prompt) {
return new PromptOptions<string>(
prompt,
$"Please respond(yes/no)!",
"It seems you are satisfied with the answer. Thannk you",
null,
0,
new PromptStyler(PromptStyle.Auto));
}