Skip to content

Instantly share code, notes, and snippets.

@ikivanc
Created March 21, 2019 16:28
Show Gist options
  • Save ikivanc/dbad21d4266b9b735e48b1410052dd14 to your computer and use it in GitHub Desktop.
Save ikivanc/dbad21d4266b9b735e48b1410052dd14 to your computer and use it in GitHub Desktop.
HeroCard
// Reply to the activity we received with an activity.
var reply = turnContext.Activity.CreateReply();
var heroCard = new HeroCard
{
Title = "BotFramework Hero Card",
Subtitle = "Microsoft Bot Framework",
Text = "Build and connect intelligent bots to interact with your users naturally wherever they are," +
" from text/sms to Skype, Slack, Office 365 mail and other popular services.",
Images = new List<CardImage> { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") },
Buttons = new List<CardAction> { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") },
};
reply.Attachments.Add(heroCard.ToAttachment());
// Send the card(s) to the user as an attachment to the activity
await turnContext.SendActivityAsync(reply, cancellationToken);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment