Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Created July 24, 2017 16:18
Show Gist options
  • Select an option

  • Save jazzedge/8c7f547a824e3b23727f387cad6653ec to your computer and use it in GitHub Desktop.

Select an option

Save jazzedge/8c7f547a824e3b23727f387cad6653ec to your computer and use it in GitHub Desktop.
Bot - Initiate action when new conversation begins
bot.on('conversationUpdate', function (message) {
if (message.membersAdded) {
message.membersAdded.forEach(function (identity) {
if (identity.id === message.address.bot.id) {
bot.send(new builder.Message()
.address(message.address)
.text("Hello! I'm a bot."));
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment