[英]'reloadAction' in Microsoft Bot Framework 3.15 for Node.js is not passing on 'dialogArgs'
I'm following the example from the Bot Framework pages, under 'Handle User Actions' ( https://docs.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-dialog-actions?view=azure-bot-service-3.0 )我正在遵循 Bot Framework 页面中的示例,位于“处理用户操作”下( https://docs.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-dialog-actions ?view=azure-bot-service-3.0 )
// Order dinner.
bot.dialog('orderDinner', [
function(session, args, next){
if(args && args.isReloaded){
// Reload action was triggered.
}
session.send("Lets order some dinner!");
builder.Prompts.choice(session, "Dinner menu:", dinnerMenu);
}
//...other waterfall steps...
])
// Once triggered, will restart the dialog.
.reloadAction('startOver', 'Ok, starting over.', {
matches: /^start over$/i,
dialogArgs: {
isReloaded: true;
}
});
and after reloading the dialog args.isReloaded
is always undefined
.并且在重新加载对话框之后args.isReloaded
总是undefined
。 That is, it doesn't seem that the framework is passing through what is put in dialogArgs
.也就是说,框架似乎没有通过dialogArgs
中的内容。 Any clues as to what I might be missing?关于我可能会丢失什么的任何线索? I'm using v 3.15 (or rather, the people for whom I'm working are using 3.15) -- was this something that was introduced in a later version 3, that is, after 3.5?我正在使用 v 3.15(或者更确切地说,我为之工作的人正在使用 3.15)——这是在更高版本 3 中引入的东西,即 3.5 之后? Or is something just going wrong?还是只是出了什么问题?
Any help much appreciated!非常感谢任何帮助!
Tried the code with the specified version and is working correctly.尝试了指定版本的代码并且工作正常。 There is an errant ";"有一个错误的“;” in your code (which is also in the docs) that should be removed and may be the culprit.在您的代码(也在文档中)中应该删除并且可能是罪魁祸首。 Change the following line to the below.将以下行更改为以下内容。
Hope of help!希望有帮助!
dialogArgs: {
isReloaded: true
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.