Skip to content

Commit

Permalink
added resp cards
Browse files Browse the repository at this point in the history
  • Loading branch information
Chin Yan Keat (Digi - Central) authored and Chin Yan Keat (Digi - Central) committed May 19, 2017
1 parent d56d1ed commit 35320a8
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions bot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,23 @@ bot.dialog('menu', [
builder.CardAction.imBack(session, "Postpaid", "Postpaid"),
builder.CardAction.imBack(session, "Broadband", "Broadband"),
builder.CardAction.imBack(session, "Roaming", "Roaming"),
builder.CardAction.imBack(session, "Other Questions", "Other Questions"),
builder.CardAction.imBack(session, "Other Questions", "Other Questions")
])])
.suggestedActions([
builder.CardAction.imBack(session, "Main Menu", "Main Menu")
]);
;
builder.Prompts.choice(session, respCards, AnyResponse, { listStyle:builder.ListStyle.button, maxRetries:MaxRetries, retryPrompt:DefaultErrorPrompt});
session.send(respCards);

var msg = new builder.Message(session)
.text("Thank you for expressing interest in our premium golf shirt! What color of shirt would you like?")
.suggestedActions([
builder.CardAction.imBack(session, "Prepaid", "Prepaid"),
builder.CardAction.imBack(session, "Postpaid", "Postpaid"),
builder.CardAction.imBack(session, "Broadband", "Broadband"),
builder.CardAction.imBack(session, "Roaming", "Roaming"),
builder.CardAction.imBack(session, "Other Questions", "Other Questions")
]);
session.send(msg);

// builder.Prompts.choice(session, respCards, AnyResponse, { listStyle:builder.ListStyle.button, maxRetries:MaxRetries, retryPrompt:DefaultErrorPrompt});
},
function (session, results) {
session.send(DefaultMaxRetryErrorPrompt);
Expand Down

0 comments on commit 35320a8

Please sign in to comment.