【发布时间】:2018-10-10 10:35:29
【问题描述】:
抱歉,这个问题可能不太好。
我尝试在添加 TextPrompt 时使用验证器(例如)
AddDialog(new TextPrompt(ServerPrompt, Validator));
验证器函数返回Task<bool>。
并希望当验证失败时,RetryPrompt会被调用。
但是没有。
Bot 只是重试ActiveDialog,没有其他任何东西。
我只想将有用的消息发送给用户,给他一些有用的建议。
// Create prompt opts to prompt for the server name
var opts = new PromptOptions {
Prompt = MessageFactory.Text("Which Server?"),
RetryPrompt = MessageFactory.Text("May you enter wrong thing, please check again!"),
};
非常感谢您的阅读。
【问题讨论】:
标签: c# .net-core dialog botframework prompt