Created
July 24, 2017 16:18
-
-
Save jazzedge/8c7f547a824e3b23727f387cad6653ec to your computer and use it in GitHub Desktop.
Bot - Initiate action when new conversation begins
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
| 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