【发布时间】:2021-03-24 20:47:47
【问题描述】:
当机器人通过按钮单击事件向 slack 发送回复回复时。松弛没有回复,一些文档说松弛接受回发事件Microsoft bot builder cards imback method doesnt display text on Slack,但我找不到如何。我使用的是机器人框架连接器而不是适配器。
public static HeroCard GetHeroCard(List<string> answerlist)
{
List<CardAction> cardButtons = new List<CardAction>();
for (int i = 0; i <= answerlist.Count-1; i++)
{
var reply = i + 1;
//CardAction plButton = new CardAction(ActionTypes.ImBack)
CardAction plButton = new CardAction()
{
Value = reply.ToString(),
Type = ActionTypes.PostBack,
Title = answerlist[i]
};
cardButtons.Add(plButton);
}
var heroCard = new HeroCard
{
Title = "",
Subtitle = "",
Text = "",
Buttons = cardButtons,
};
return heroCard;
}
[![按钮图片][1]][1]
【问题讨论】:
标签: c# botframework slack