简体   繁体   English

Microsoft Bot Framework 3.15 中用于 Node.js 的“reloadAction”未传递“dialogArgs”

[英]'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.

相关问题 带有node.js的Microsoft bot框架以及数据库和流 - microsoft bot framework with node.js plus database and flow 如何在Microsoft Bot Framework的node.js版本中“退出”? - How to 'exit' in the node.js version of Microsoft Bot Framework? 使用Node.js Microsoft Bot Framework显示图像 - Display images using the Node.js Microsoft Bot Framework 在Microsoft Bot Framework(Node.js)中的对话框之间切换 - Switches between Dialog in Microsoft Bot Framework (Node.js) 在Microsoft Bot Framework for Skype(node.js)中提示输入文件 - Prompt for file in Microsoft Bot Framework for Skype (node.js) 在bot.use中设置event.textLocale(Node.js Microsoft Bot Framework) - Setting event.textLocale in bot.use (Node.js Microsoft Bot Framework) 如何为 bot 响应添加延迟,使其在 Microsoft Bot Framework Node.js 中感觉更真实? - How to add a delay to bot responses, so it feels more real in Microsoft Bot Framework Node.js? 什么决定了“bot.dialog”何时传递到 Microsoft Bot Framework 中瀑布的下一个 function? (Node.js) - What determines when 'bot.dialog' passes to the next function of the waterfall in Microsoft Bot Framework? (Node.js) 如何在Microsoft团队中添加Microsoft BotBuilder框架Node.js版本4 Bot? - How to add the microsoft botbuilder framework node.js version 4 bot in microsoft teams? Microsoft QnA bot Node.js - Microsoft QnA bot Node.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM