Consider the following dialog box.
bot.dialog('/beer', [
function (session) {
builder.Prompts.number(session, "How many mugs would you like?");
},
function (session, results) {
if (results.response && results.response.entity != '(quit)') {
session.endDialog("Beer" + (results.response == 1 ? " is on the" : "s are on their") + " way, enjoy!");
} else {
session.endDialog("Goodbye, See you later..");
}
}
]);
When this is requested by the user, if the user enters text (for example, "Test") instead of a valid number, the bot gives an answer like default_number .
The same default error message for default_number , selection default_choice , text default_error , etc. I tried different ways to figure out how to take control of it and determine the default behavior, something like a bot, says "I did not recognize it, try again" instead of giving an error, which makes no sense to the user.
Can anyone highlight this?
https://docs.botframework.com/en-us/node/builder/chat/prompts/#promptsnumber