0.0.4 • Published 8 years ago

slack-welcome-bot v0.0.4

Weekly downloads
3
License
WTFPL
Repository
github
Last release
8 years ago

slack-welcome-bot

./config.js

module.exports = {
  token: 'SOME_TOKEN',
  outbound: 'SLACK_INBOUND_WEBHOOK_URL',
  template: ({ user }) => ({
    channel: user.id,
    username: 'Welcome-bot',
    icon_url: 'https://s3-us-west-2.amazonaws.com/slack-files2/avatars/2015-05-12/4870580147_ea2e1e558d8f997901d2_88.jpg',
    text: 'Welcome ' + user.profile.first_name,
    attachments: [{
      text: 'Take a look at our CoC: https://github.com/javascriptmx/codigo-de-conducta'    
    }]
  })
}

Usage

Setup

By setting up your event subscriptions in slack

CLI

SLACK_PORT=3000 welcome-bot ./config.js

Middleware

const WelcomeBot = require('slack-welcome-bot');

app.use('/slack-inbound', WelcomeBot(require('./config.js')))
0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago