botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

How can I prompt a user without redirecting to another method?

Open vaditya04 opened this issue 10 years ago • 3 comments

I want to use PromptDialog.Text to get a string input from a user.

But, I don't want to redirect to another method (using resume). I want to continue the execution of the same method with the user string input stored in a variable.

Thanks.

vaditya04 avatar Jun 03 '16 07:06 vaditya04

You can specify the same method as the callback. If you want that same method take both IAwaitable (for incoming messages) and IAwaitable (from the prompt dialog), then you'll need to change the method to take IAwaitable and use a is-a type test to see which value was passed in.

willportnoy avatar Jun 03 '16 20:06 willportnoy

@willportnoy Thanks for the response.

However, this solution is troublesome if I'm working with LUIS, wherein methods will necessarily have the context and a LUISResult as parameters. Is there any other solution for this? I've opened Issue #428 asking this as a separate question.

vaditya04 avatar Jun 06 '16 07:06 vaditya04

I'll close this issue in favor of #428.

willportnoy avatar Jun 08 '16 20:06 willportnoy