【问题标题】:When RetryPrompt Dialog is called?何时调用 RetryPrompt Dialog?
【发布时间】: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


    【解决方案1】:

    当Validator的结果Task<bool>为假时。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-10
      • 1970-01-01
      相关资源
      最近更新 更多