我得到警告:IntentDialog – 当我填写表单Node.js僵尸框架找不到null的意图处理程序

我对node.js和bot框架非常陌生。 我在我的机器人中运行的json中创build了一个表单。 然而,填写表格后,我得到的错误

/ – WARN: IntentDialog - no intent handler found for null

我不确定这是为什么。 我正在使用.addAttachment来使用卡和session.send(味精)呈现给用户的forms。 但是,表单完成并提交后,我得到上述错误信息。 下面是正在使用的表单和node.js中的代码

 var card = { 'contentType': 'application/vnd.microsoft.card.adaptive', 'content': { '$schema': 'http://adaptivecards.io/schemas/adaptive-card.json', 'type': 'AdaptiveCard', 'version': '1.0', 'body': [ { 'type': 'Container', 'items': [ { } ] } ], 'actions': [ // Contact Information Form { 'type': 'Action.ShowCard', 'title': 'Contact Form', 'card': { 'type': 'AdaptiveCard', 'body': [ { 'type': 'TextBlock', 'text': 'Please enter your name:' }, { 'type': 'Input.Text', 'id': 'name', 'speak': '<s>Please enter your name</s>', 'placeholder': 'Enter Name', 'style': 'text' }, { 'type': 'TextBlock', 'text': 'What is your phone number?' }, { 'type': 'Input.Number', 'id': 'phone', //'style': 'text' }, { 'type': 'TextBlock', 'text': 'What is your email address?' }, { 'type': 'Input.Text', 'id': 'email', 'placeholder': 'Enter Email', 'style': 'text' } ], 'actions': [ { 'type': 'Action.Submit', 'title': 'Submit', 'data': { 'type': 'submit' } } ] } }, ] } }; 

代码在node.js中

 bot.dialog('Ask for contact info', [ function (session, args) { if (session.conversationData.amending) { session.dialogData.nextStep = 'Show summary'; } else { session.dialogData.nextStep = 'Ask for severity'; } builder.Prompts.text(session, "Could you please add details of who you'd like us to contact to discuss your bug further?"); var msg = new builder.Message(session) .addAttachment(card); session.send(msg); }, function (session, results) { session.conversationData.contactInfo = results.response; session.beginDialog(session.dialogData.nextStep); } ]); 

要从自适应卡forms接收提交,您可以尝试使用以下瀑布步骤:

 bot.dialog('form', [ (session, args, next) => { var card = { ... }; if (session.message && session.message.value) { // A Card's Submit Action obj was received next(session.message.value) } else { var msg = new builder.Message(session) .addAttachment(card); session.send(msg); } }, (session, results) => { session.send(JSON.stringify(results)); } ]) 

然而,我不能重现这个问题WARN: IntentDialog - no intent handler found for null ,你能否提供你的回购让我浏览一下你的整个结构,这是进一步分析的好处。