GithubHelp home page GithubHelp logo

slackbot-python's Introduction

SlackBot

A Slack bot running in daemon mode with Amazon SQS integration.

Original version using Flask and Outgoing WebHooks integration by llimllib/slask.

Installation

  1. Clone this repo
  2. pip install -r requirements.txt
  3. Add the Amazon SQS integration on Slack
  4. Add the Incoming WebHooks integration on Slack
  5. Update config.py with your information (tokens,keys,botname,etc)
  6. Run python bot.py start
  7. That's it! Try typing !echo Hello World into any chat room

IAM Permission for Slack

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt2123981740180",
      "Effect": "Allow",
      "Action": [
        "sqs:*"
      ],
      "Resource": [
        "arn:aws:sqs:us-east-1:<account id>:<sqs queue name>"
      ]
    }
  ]
}

Heroku

You can also host your Bot for free on Heroku. It is ready to deploy.

heroku create
git push heroku master
heroku ps:scale worker=1
heroku ps
heroku logs

Commands

Right now, !help, !echo, !gif, !image, !youtube and !wiki are the only available commands.

It's super easy to add your own commands! Just create a python file in the plugins directory with an on_message function that returns a string.

Integrations

Besides commands you can also integrate other types of plugins that just listen for a specific message in the SQS queue.

See per example the stackdriver-reader plugin that wait for Stackdriver to send policy alerts to a SNS topic which is subscribed by the SQS queue used by this daemon.

slackbot-python's People

Contributors

fsalum avatar k001 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.