I am currently playing around with Bots and LUIS. So I have a running Bot. In my RootDialog, I handle all the intents that I get from LUIS. Now I want to check if an Entity is missing for an intent.
if (result.Entities.Count == 0) {
var ct = new CancellationToken();
await context.Forward(new ParameterDialog(), ResumeAfterParameterDialog, message, ct);
If there is no Entity I'm creating a new child dialog.
public class ParameterDialog : IDialog<object> {
public async Task StartAsync(IDialogContext context) {
context.Wait(MessageReceivedAsync);
}
public async Task MessageReceivedAsync(IDialogContext context, IAwaitable<IMessageActivity> argument) {
argument = new PromptDialog.PromptString("Please enter a parameter", "please try again", 2);
var prompt = await argument;
await context.PostAsync($"Your Parameter is: {prompt}");
context.Done(prompt);
}
}
If I could get user input I would then pass it back to my parent dialog.
Now I don't really know how I can stop the Bot and let it wait for user input. Can someone please explain how I can accomplish that? Thank you!