c# - 如何在提交操作时编辑 MS Bot Framework Adaptive Card

标签 c# botframework microsoft-teams adaptive-cards

在我的机器人中,我有一张带提交按钮的自适应卡片。我可以在提交操作时修改卡片或禁用按钮或删除此卡片吗?

最佳答案

在 Teams 中,您可以选择更新卡片消息。所以你可以使用类似的东西:

var newActivity = MessageFactory.Attachment(myUpdatedCard);
newActivity.Id = activityId //the Id of the original activity you sent;
await turnContext.UpdateActivityAsync(newActivity, cancellationToken);

发送新版本的卡片。

关于c# - 如何在提交操作时编辑 MS Bot Framework Adaptive Card,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60215966/

相关文章:

node.js - 如何在 app.js 中使用 LUIS 来识别不同文件夹中的对话框

azure - 在 Azure Application Insights 中记录机器人的数据

node.js - 如何在微软团队机器人中使用自适应卡在其他浏览器中打开网址?

c# - 使用图形 API 添加 MS Teams 网站选项卡错误

c# - Emgu,.FindContours() 和 CvInvoke.FindContours() 有什么区别

c# - ASP.NET MVC 中身份验证的 OutputCache 困境

c# - 我们可以在没有 azure 或机器人模拟器的情况下在自己的客户端中测试机器人吗?

azure - Bot 框架性能最佳实践

c# - ASP.NET 自动将 & 转换为 &

c# - 从 byte[] 创建 zip 文件