0

I am a complete N00b when it comes to creating a bot service. I have generated my bot using the Basic Template. In the template code the run.csx file starts the code with the

public static async Task<object> Run(HttpRequestMessage req, TraceWriter log) 

method. There are many people that point to the PizzaBot for reference but I can not tell what code is called first to kick off the Dialog Flow. Where would I start the dialog chain ? Do I replace this logic

....

case ActivityTypes.Message:
          await Conversation.SendAsync(activity, () => new EchoDialog());
            break;
....

with

await Conversation.SendAsync(activity, () => new RootDialog());

or somewhere completely different. Just trying to figure out where to create the root dialog to start the process and all the samples I have seen do not have a run.csx and I have no idea how the service is getting started.

Joel Parker
  • 295
  • 1
  • 4
  • 17
  • 1
    I think everything is explained here: https://learn.microsoft.com/en-us/bot-framework/azure/azure-bot-service-template-basic So yes it is in the `case ActivityTypes.Message:` block – Nicolas R Sep 07 '17 at 14:43
  • Do you want to execute the `EchoDialog()` rather than the `RootDialog()`? Or do you want to use both of the dialogs? – D4RKCIDE Sep 07 '17 at 16:13
  • Nicolas gave the answer I was looking for. – Joel Parker Sep 07 '17 at 16:44
  • @NicolasR why not post your comment as a complete answer, so that can be checked as the favourite one? – superjos May 06 '18 at 01:08

0 Answers0