I'm creating a chat bot for slack using Microsoft's botbuilder and LUIS.
Is there a way to keep using builder.Prompts.text()
to keep asking the user if there are anymore information the user wants to put, like a for
or while
loop? For example I want to keep on asking the user an undefined number of times if there's a key
the user wants to save and only stop when the user types done
and then I will have an equal number of builder.Prompts.text()
to ask the user for the values to put in each of those keys.
function (session, results, next) {
builder.Prompts.text(session, "Another key to put?");
},
function (session, results, next) {
builder.Prompts.text(session, "Value to put?");
}
It doesn't seem like I can create some sort of loop with an array that saves each key with its value, I'm not sure how to approach this.
Thanks.
via user3128376
No comments:
Post a Comment