Created
June 27, 2018 15:45
-
-
Save kenjosling/61ce02d50fe25db64f9de088424092f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot.dialog('Show.Help', [ | |
function (session) { | |
if (session.message && session.message.value) { | |
session.endDialog(); | |
switch (session.message.value.choice) { | |
case 'Submit.Feedback': | |
builder.Prompts.text(session, 'TODO: Write code to submit feedback'); | |
break; | |
} | |
return; | |
} | |
else | |
{ | |
var msg = new builder.Message(session); | |
var about = new About(process.env.BotName, process.env.IconUrl, process.env.CompanyName, process.env.BotVersion, process.env.UserGuideUrl); | |
msg.addAttachment(about.toCard()); | |
session.send(msg); | |
} | |
} | |
]).triggerAction({ | |
matches: 'Show.Help', | |
}).cancelAction('cancel', "Fair enough.", { | |
matches: /^(cancel|goodbye|quit|exit)/i | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment