【发布时间】:2018-12-21 01:56:35
【问题描述】:
所以,我正在尝试将按钮点击移动到 triggerAction() 而不是我现在已经实现的 beginDialogAction() 但我似乎找不到正确的正则表达式模式来匹配和路由此操作按钮点击:
UniversalBot("*") routing "action?loadreference-pt=FT2018/52" from "emulator"
请记住,最后一部分是动态的,所以它总是这样:
"action?loadreference-pt=[INVOICE_NUMBER]"
现在,这很好用,但我更喜欢使用 triggerAction() 来覆盖 customPrompts():
bot.triggerAction('loadreference-pt', '/loadreference-pt');
我尝试过像这样的正则表达式:
.triggerAction({ matches: /action?loadreference.pt=\w+/ });
但它不起作用。 有人可以帮帮我吗?
谢谢!
【问题讨论】:
标签: node.js botframework bots chatbot