Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Last active July 24, 2017 10:10
Show Gist options
  • Select an option

  • Save jazzedge/07c39f7414d05d0d069ca76ad4f943ac to your computer and use it in GitHub Desktop.

Select an option

Save jazzedge/07c39f7414d05d0d069ca76ad4f943ac to your computer and use it in GitHub Desktop.
Bot - Action card displayed when new user joins conversation
//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