【问题标题】:Slack button not send response when using bot frame work使用机器人框架时,松弛按钮不发送响应
【发布时间】: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


    【解决方案1】:

    我检查了MS Documents,发现我错过了一项设置。

    添加和配置交互式消息(可选)。 完美解决了问题。

    【讨论】:

      猜你喜欢
      • 2017-03-20
      • 2018-03-19
      • 2016-10-27
      • 1970-01-01
      • 2018-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-17
      相关资源
      最近更新 更多