Node.js MS-BOT框架:附件

Node.js MS-BOT框架:附件,node.js,bots,Node.js,Bots,我正在尝试使用以下站点中的示例处理MS Bot框架中的附件: 功能(会话){ console.log('here') builder.Prompts.text(会话“请立即上载最新报告”) }, 功能(会话、结果){ console.log(会话) var msg=session.message; 如果(msg.attachments&&msg.attachments.length>0){ //回显附件 var attachment=msg.attachments[0]; session.se

我正在尝试使用以下站点中的示例处理MS Bot框架中的附件:

功能(会话){
console.log('here')
builder.Prompts.text(会话“请立即上载最新报告”)
},
功能(会话、结果){
console.log(会话)
var msg=session.message;
如果(msg.attachments&&msg.attachments.length>0){
//回显附件
var attachment=msg.attachments[0];
session.send({
文字:“您发送:”,
附件:[{
contentType:attachment.contentType,
contentUrl:attachment.contentUrl,
名称:attachment.name
}]
});
}否则{
//回显用户文本
session.send(“您说的是:%s”,session.message.text);
}

}
结果表明,机器人无法从级联的第二步开始工作。我把它移走了,这是级联的第一步,现在可以工作了。

在builder.Prompts.text()之后,它只接收一条文本消息。 使用builder.Prompts.attachment接收附件。

是否显示任何错误?请尝试重新启动机器人仿真程序。有时这可以解决问题。