我试图通过Microsoft Bot Framework使用互联网上的一些例子为MS Teams创建机器人。
我已经创建了用户卡,其中有 "查看报告 "按钮
function userCard(session, connector, name, workingStatus, TeamsID) {
var card = new builder.HeroCard(session)
.title(name)
.subtitle(workingStatus.toString())
.buttons([
builder.CardAction.dialogAction(session, 'userReport', TeamsID, 'See Report')
]);
return card;
}
卡片显示没有任何问题。当我按下按钮时,应该会触发新的对话框。
//Begins the userReport dialog if the button on the userCard is pressed
bot.beginDialogAction('userReport', '/userReport');
当我在Bot Framework模拟器中测试时,这个功能工作得很完美。在MS Teams中,它没有触发userReport对话框,而是进入了主对话框(消息发送时使用的那个)。因此,这个按钮根本无法工作。
你能不能,请告知应该调整添加什么,以使这个按钮在MS Teams工作?
先谢谢你