greekdigitalcommunity / gdc-bot

Bot written in bot-kit for our GDC community
https://greekdigitalcommunity.com/
0 stars 2 forks source link

Welcome message and optional dialog #1

Open tkorakas opened 6 years ago

tkorakas commented 6 years ago

When a new user joins introductions channel we'll:

tkorakas commented 6 years ago

We need to enable "member_joined_channel" event and invite bot to channel.

tkorakas commented 6 years ago

It would be better to send DM to user when joins the workspace. Instead of member_joined_channel event I'll use team_join.

Example:

controller.on('team_join', function (bot, message) {
  bot.api.chat.postMessage({channel: response.channel.id, text: 'Welcome', as_user: true}, (err, response) => {
    // Process postMessage error and response
  })
})