Answers for "confirmation prompt bot framework"

C#
0

confirmation prompt bot framework

private async Task<DialogTurnResult> AskForAConfirmationAsync(
    WaterfallStepContext stepContext,
    CancellationToken cancellationToken)
{
    var name = stepContext.Context.Activity?.Text;
 
    Activity textPrompt = stepContext.Context.Activity.CreateReply($"Your name is {name}. Is that correct?");
    PromptOptions promptOptions = new PromptOptions
    {
        Prompt = textPrompt
    };
 
    return await stepContext.PromptAsync(ConfirmPromptId, promptOptions, cancellationToken);
}
Posted by: Guest on August-30-2021

C# Answers by Framework

Browse Popular Code Answers by Language