我正在开发一个机器人与微软BotFramework.When机器人发送适配卡的通知文本是“发送卡”。
有没有办法修改这个文本?
发布于 2020-11-24 16:45:14
可以,您可以使用活动的“摘要”属性更改通知上的文本。您可以继续尝试以下示例代码:
var response = MessageFactory.Text(string.Empty);
AdaptiveCard ad = new AdaptiveCard();
ad.Body = new List<AdaptiveElement>() {
new AdaptiveTextBlock()
{
Text= "testing",
Id ="testing"
}
};
Attachment att = new Attachment()
{
Content=ad,
ContentType= AdaptiveCard.ContentType
};
response.Attachments.Add(att);
response.Summary = "showing custom greeeting from the Bot - rather than send a card";
context.SendActivityAsync(response, cancellationToken);https://stackoverflow.com/questions/64981142
复制相似问题