Skip to content

Instantly share code, notes, and snippets.

View ikivanc's full-sized avatar

Ibrahim KIVANC ikivanc

View GitHub Profile
@ikivanc
ikivanc / MainBot.cs
Created March 21, 2019 16:28
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") },
@ikivanc
ikivanc / MainBot.cs
Created March 21, 2019 16:27
AdaptiveCard
// Reply to the activity we received with an activity.
var reply = turnContext.Activity.CreateReply();
// combine path for cross platform support
string[] paths = { ".", "Resources", "adaptiveCard.json" };
var adaptiveCardJson = File.ReadAllText(Path.Combine(paths));
var adaptiveCardAttachment = new Attachment()
{
@ikivanc
ikivanc / MainBot.cs
Last active March 21, 2019 16:25
ThumbnailCard
// Reply to the activity we received with an activity.
var reply = turnContext.Activity.CreateReply();
var heroCard = new ThumbnailCard
{
Title = "BotFramework Thumbnail 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") },
@ikivanc
ikivanc / MainBot.cs
Last active July 30, 2019 13:42
Send Typing Activity
//Send typing activity to User
var typing = turnContext.Activity.CreateReply();
typing.Type = ActivityTypes.Typing;
await turnContext.SendActivityAsync(typing);