Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 3.22 KB

README.md

File metadata and controls

51 lines (29 loc) · 3.22 KB

Slack Bot Server

Build Status Dependency Status Code Climate

An opinionated boilerplate and demo for a complete Slack bot service with Slack button integration, in Ruby. A good demo of a service built on top of this is playplay.io.

Try Me

A demo version of this app is running on Heroku at slack-bot-server.herokuapp.com. Use the Add to Slack button. The bot will join your team as @slackbotserver.

Once a bot is registered, you can invite to a channel with /invite @slackbotserver interact with it. DM "hi" to it, or say "@slackbotserver hi".

What is this?

A Grape API serving a Slack Ruby Bot to multiple teams. This is a boilerplate that combines a web server, a RESTful API and multiple instances of slack-ruby-bot. It integrates with the Slack Platform API.

How do I use this?

Fork this project and roll out a Slack bot service to multiple teams without needing to create separate application instances. This boilerplate is a means to get you started, but you should also be able to take updates from upstream if you want. Your customers can use a Slack button to install your bot. You can start adding slack command handlers on top of this code.

Run Your Own

Install MongoDB, required to store teams.

Create a New Application on Slack.

Follow the instructions, note the app's client ID and secret, give the bot a default name, etc. The redirect URL should be the location of your app, for testing purposes use http://localhost:9292. For a local deployment create a .env file and add SLACK_CLIENT_ID=... and SLACK_CLIENT_SECRET=... in it. Run bundle install and foreman start. Navigate to localhost:9292. Register using the Slack button.

If you deploy to Heroku set SLACK_CLIENT_ID and SLACK_CLIENT_SECRET via heroku config:add SLACK_CLIENT_ID=... SLACK_CLIENT_SECRET=....

Examples Using Slack Bot Server

Copyright & License

Copyright Daniel Doubrovkine, 2015-2016

MIT License