Created
August 4, 2016 15:31
-
-
Save selfcontained/b0f6b28554055f33eaffe75600d774ed 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
// Send a message to the user that added the bot right after it connects | |
slapp.event('bb.team_added', function (msg) { | |
slapp.client.im.open({ token: msg.meta.bot_token, user: msg.meta.user_id }, (err, data) => { | |
if (err) { | |
return console.error(err) | |
} | |
let channel = data.channel.id | |
msg | |
.say({ channel, text: 'Thanks for adding me to your team!' }) | |
.say({ channel, text: 'Please /invite me to a channel to get things started.' }) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment