Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Created July 8, 2017 13:47
Show Gist options
  • Save jazzedge/2a2c82ae5b34770ba075d91b616989cd to your computer and use it in GitHub Desktop.
Save jazzedge/2a2c82ae5b34770ba075d91b616989cd to your computer and use it in GitHub Desktop.
Bot Hero card
var welcomeCard = new builder.HeroCard(session)
.title('welcome_title')
.subtitle('welcome_subtitle')
.images([
new builder.CardImage(session)
.url('https://placeholdit.imgix.net/~text?txtsize=56&txt=Contoso%20Flowers&w=640&h=330')
.alt('contoso_flowers')
])
.buttons([
builder.CardAction.imBack(session, session.gettext(MainOptions.Shop), MainOptions.Shop),
builder.CardAction.imBack(session, session.gettext(MainOptions.Support), MainOptions.Support)
]);
session.send(new builder.Message(session)
.addAttachment(welcomeCard));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment