Example #1
0
        /// <summary>
        /// Execution for the <see cref="GetStartedDialog"/> starts here.
        /// </summary>
        /// <param name="context">Mandatory. The context for the execution of a dialog's conversational process.</param>
        public async Task StartAsync(IDialogContext context)
        {
            if (_botDataService.hasCompletedGetStarted(context))
            {
                // user has already done setup, show them what Buddy can do
                await FinishAsync(context);
            }
            else
            {
                // Introductions and user setup
                await context.PostAsync("Hi there... 🤔");

                await _messageHelper.ConversationPauseAsync(context, Pause.MediumPause);

                await context.PostAsync("I don't think, we've met before? Let me introduce myself..");

                await _messageHelper.ConversationPauseAsync(context, Pause.LongerPause);


                await context.PostAsync("I'm BuddyBot! I'm an intelligent personal assistant, here to help wherever I can! 😀");

                await _messageHelper.ConversationPauseAsync(context, Pause.LongPause);


                await context.PostAsync("Let's get you setup. Remember, I'm still learning, so be patient, and follow my prompts carefully!");

                await _messageHelper.ConversationPauseAsync(context, Pause.LongPause);

                context.Call(_dialogBuilder.BuildNameDialog(context.Activity.AsMessageActivity()), Resume_AfterNameDialog);
                await Task.CompletedTask;
            }
        }
Example #2
0
 public async Task UpdatePreferredName(IDialogContext context, LuisResult result)
 {
     context.Call(_dialogBuilder.BuildNameDialog(GetMessageActivity(context), result.Entities), Resume_AfterNameDialog);
     await Task.Yield();
 }