Last active
July 24, 2017 10:10
-
-
Save jazzedge/07c39f7414d05d0d069ca76ad4f943ac to your computer and use it in GitHub Desktop.
Bot - Action card displayed when new user joins conversation
This file contains hidden or 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
| //Dialog when user joins conversation | |
| var cFirstRun = true; | |
| bot.on('conversationUpdate', function (message) { | |
| if (cFirstRun == true) { | |
| cFirstRun = false; | |
| var reply = new builder.Message() | |
| .address(message.address) //Required | |
| .text("This is Yaddop's Geography Chatbot") | |
| .addAttachment({ | |
| contentUrl:"https://roccobot02gghwh4.blob.core.windows.net/images/chatbot1.jpg", | |
| contentType: 'image/jpg', | |
| name: 'chatbot1.png' | |
| }); | |
| bot.send(reply); | |
| setTimeout(function(){ | |
| var reply = new builder.Message() | |
| .address(message.address) //Required | |
| .text('I can help you with questions regarding countries and capital cities.'); | |
| bot.send(reply); | |
| }, 3000); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment