Skip to content

evgeny-zinder/slack-bot

Repository files navigation

SensioLabsInsight Build Status Scrutinizer Code Quality Code Coverage StyleCI

Slack Bot Framewotk

Intro

This framework is designed for creating Slack chat bots

Framework-based app skeleton: https://github.com/evgeny-zinder/slack-bot-app-skeleton

Features:

  • communicates with Slack using real-time WebSocket connection
  • able to respond (by running callback PHP functions) to any message patterns
  • able to run ansible-style playbooks with extensible set of actions

Installation

git clone git@github.com:evgeny-zinder/slack-bot.git
cd slack-bot
curl -sS https://getcomposer.org/installer | php
php composer.phar install

Launching

  1. Start server

     php bin/slackbot.php server:start --config=config.yml
    
  2. Start RTM WebSocket listener (if you plan to work with user input)

     php bin/slackbot.php rtm:start --config=config.yml
    
  3. Run playbook

     php bin/slackbot.php playbook:run --playbook=examples/0-simple-message.yml