微软bot框架通过卡片操作传递价值

时间:2018-11-30 08:40:42

标签: c# botframework

我已经定义了以下

feedback.SuggestedActions = new SuggestedActions()
        {

            Actions = new List<CardAction>()
            {
                new CardAction(){ Title = "\U0001F603", Type=ActionTypes.PostBack,Value=$"happy"},
                new CardAction(){ Title = "\U0001F61E", Type=ActionTypes.PostBack, Value=$"unhappy" }
            }
        };

点击操作后将转到方法

private async Task MessageReceivedAsync(IDialogContext context, IAwaitable<object> result)
    {
        var activity = await result as Activity;}

但是activity.value中的值始终为null如何发送值

0 个答案:

没有答案