首页 > 解决方案 > 如何使用机器人框架在团队频道的自适应卡片中添加提及

问题描述

我试图在自适应卡的帮助下在 ms 团队频道中提及用户,但没有适当的文档,并且此处给出的解决方案示例不起作用?有没有人试过请帮忙

标签: botframeworkmicrosoft-teamsadaptive-cards

解决方案


你用的是JS吗?我刚刚发布了一个类似的问题,但它为用户提供了一个有效的解决方案。我试图提到一个机器人。 这是我刚刚提交的帖子

CardFactory.adaptiveCard({
  $schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
  type: 'AdaptiveCard',
  msteams: {
    entites: [
      {
        type: 'mention',
        text: '<at>(username)</at>',
        mentioned: {
          id: <userID>,
          name: <username>,
          role: 'user'
        }
      }
    ]
  }
  body: [
    {
      type: 'TextBlock',
      text: '<at>(userName)</at>',
    }
  ]
});

这是我举的例子


推荐阅读