【发布时间】:2020-05-08 00:26:56
【问题描述】:
我正在尝试使用 Internet 上的一些示例通过 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 Emulator 中测试此功能时,它运行良好。 在 MS Teams 中,它不会触发 userReport 对话框,而是转到主对话框(发送消息时使用的对话框)。所以这个按钮根本不起作用。
请您告知应该调整/添加什么以使此按钮在 MS Teams 中工作?
提前致谢!
【问题讨论】:
标签: dialog botframework chatbot