{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/1699","repository_url":"https://api.github.com/repos/Microsoft/BotBuilder","labels_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/1699/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/1699/comments","events_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/1699/events","html_url":"https://github.com/Microsoft/BotBuilder/issues/1699","id":190496395,"number":1699,"title":"[Help] Cancel builder.Prompts.choice()","user":{"login":"scibol","id":9947611,"avatar_url":"https://avatars.githubusercontent.com/u/9947611?v=3","gravatar_id":"","url":"https://api.github.com/users/scibol","html_url":"https://github.com/scibol","followers_url":"https://api.github.com/users/scibol/followers","following_url":"https://api.github.com/users/scibol/following{/other_user}","gists_url":"https://api.github.com/users/scibol/gists{/gist_id}","starred_url":"https://api.github.com/users/scibol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scibol/subscriptions","organizations_url":"https://api.github.com/users/scibol/orgs","repos_url":"https://api.github.com/users/scibol/repos","events_url":"https://api.github.com/users/scibol/events{/privacy}","received_events_url":"https://api.github.com/users/scibol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-19T13:27:32Z","updated_at":"2016-11-19T13:27:32Z","closed_at":null,"body":"My bot has a prompt that asks for user input:\r\n\r\n```builder.Prompts.choice(session, \"Is it ok?\", [\"Yes\", \"No\"]);```\r\nNow, when a user responds with something else other than \"Yes\" or \"No\" the program will always reply with:\r\n\r\n```I did not understand. Please choose an option from the list```\r\nwith the same choices as before.\r\n\r\nI would like the bot to not ask for input again if the user types something else other than \"Yes\" or \"No\" (and reset the prompt stack so). Is there a way to do so?\r\n\r\nSample code of what i would like to do:\r\n```\r\nbot.dialog('/', [\r\n    function (session) {\r\n        builder.Prompts.choice(session, \"Is it ok?\", [\"Yes\", \"No\"]); \r\n    },\r\n    function (session, results) {\r\n        if (results.response.entity == \"Yes\") {\r\n            session.send(\"You have chosen Yes!\"); \r\n        } else if (results.response.entity == \"No\") {\r\n            session.send(\"You have chosen No!\");\r\n        } else {\r\n        // users writes something else than yes or no\r\n        // prompts pop itself from stack like it never happened\r\n        }\r\n    }\r\n]);\r\n```"}}
{"actor":{"display_login":"scibol"}}