Guest User

Untitled

a guest
Jul 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. IDialog recipe_dialog = dialogs.Find(FindRecipeDialog.Id);
  2. dc.Dialogs.Add(FindRecipeDialog.Id, recipe_dialog);
  3. await dc.Replace(FindRecipeDialog.Id, dialogArgs);
  4.  
  5. async(dc, args, next) =>
  6. {
  7. UserStateObject newUserStateObject;
  8. var userState = UserState<UserState>.Get(dc.Context);
  9. UserStateObject userStateObject = JsonConvert.DeserializeObject<UserStateObject>(userState.UserStateObject);
  10. if (args == null) {
  11. await FindRecipe(dc);
  12. } else {
  13. newUserStateObject = args["userState"] as UserStateObject;
  14. if(newUserStateObject.UserInputs.UserRecipeChoices == RecipeUserChoicesEnum.AddAnotherProductChoice)
  15. await AddOtherProductChoice(dc, userStateObject);
  16. }
  17. }
  18.  
  19. {System.Exception: DialogSet.continue(): Can't continue dialog. A dialog with an id of 'FindRecipe' wasn't found. at Microsoft.Bot.Builder.Dialogs.DialogContext.Continue() at Microsoft.Bot.Builder.Dialogs.DialogContainer.DialogContinue(DialogContext dc) at Microsoft.Bot.Builder.Dialogs.DialogContext.Continue() at RecipeBot.RecipesBot.OnTurn(ITurnContext context) ... }
  20.  
  21. {System.Exception: DialogSet.add(): A dialog with an id of 'FindRecipe' already added. at Microsoft.Bot.Builder.Dialogs.DialogSet.Add(String dialogId, IDialog dialog) at RecipeBot.RecipesBot.OnTurn(ITurnContext context) ... }
Add Comment
Please, Sign In to add comment