【发布时间】:2019-05-30 12:03:10
【问题描述】:
我有以下代码:
this.dialogs.add(new TextPrompt("tp"));
this.dialogs.add(new TextPrompt("tp2"));
this.dialogs.add(new TextPrompt("tp3"));
this.dialogs.add(
new WaterfallDialog("send_email", [
this.promptStep.bind(this),
async step => await step.prompt("tp", "Who do you want to email?"),
async step => await step.prompt("tp2", "What's the subject line?"),
async step => await step.prompt("tp3", "And what's the message?"),
async step => await OAuthHelpers.sendMail(step.context, step.result, step.result)
])
);
当我在机器人模拟器中运行它时,会立即显示前两个文本提示。它甚至不等待我的回应。如何告诉它在继续之前等待用户响应?
【问题讨论】:
-
你能分享一下你的实际机器人的 onTurn 处理程序的实现是什么样的吗?
-
@DrewMarsh 确定:i.imgur.com/o1sXJEG.png
-
啊,好吧,所以你正在处理对话更新活动......这很好,但现在我需要看看你的 processInput 方法。如果您可以将整个文件放在一个要点或可能是最快的方法中。 :)
-
当然:gist.github.com/AskYous/5f8da20bccc42ad6d33bce49b73d250a FYI 它是用打字稿写的。
标签: botframework