Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple and Clean Slack Chatbot

Project Description

A Slack chatbot

Installation

  1. Clone the repo
  2. Create a bot user if you don’t have one yet, and copy the API Token
  3. export SLACK_TOKEN=”your-api-token”
  4. make run (or make repl for local testing)
  5. Invite Limbo into any channels you want it in, or just message it in #general. Try typing !gif dubstep cat to test it out

kitten mittens

I recommend that you always run limbo in a virtualenv so that you are running in a clean environment.

Command Arguments

  • –test, -t: Enter command line mode to enter a limbo repl.
  • –hook: Specify the hook to test. (Defaults to “message”).
  • -c: Run a single command.
  • –database, -d: Where to store the limbo sqlite3 database. Defaults to limbo.sqlite3.
  • –pluginpath, -pp: The path where limbo should look to find its plugins (defaults to /plugins).

Environment Variables

  • SLACK_TOKEN: Slack API token. Required.
  • LIMBO_LOGLEVEL: The logging level. Defaults to INFO.
  • LIMBO_LOGFILE: File to log info to. Defaults to none.
  • LIMBO_LOGFORMAT: Format for log messages. Defaults to %(asctime)s:%(levelname)s:%(name)s:%(message)s.
  • LIMBO_PLUGINS: Comma-delimited string of plugins to load. Defaults to loading all plugins in the plugins directory (which defaults to “limbo/plugins”)

Note that if you are getting an error message about not seeing environment variables, you may be running limbo as sudo, which will clear the environment. Use a virtualenv and always run limbo as a user process!

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.

You can use the !help command to print out all available commands and a brief help message about them. !help <plugin> will return just the help for a particular plugin.

By default, plugins won’t react to messages from other bots (just messages from humans). Define an on_bot_message function to handle bot messages too. See the example plugins for an easy way to define these functions.

These are the current default plugins:

Docker

  • How do I try out Limbo via docker?
    • @PeterGrace maintains a public build of limbo, available from the docker registry. Executing make docker_run will start the default bot.
    • make docker_stop will stop the bot
  • When I start the docker container, I see an error about unable to source limbo.env. Is this a problem?
    • No. The limbo.env file only exists when using Kubernetes with the included opaque secret recipe for storing your environment variables.
  • I’d like to develop plugins for Limbo, but would still like to use Docker to run the bot. Is there a quick way to add plugins to the bot?
    • Yes! Use the included Dockerfile.dev as a template, and simply build via make docker_build You’ll then need to start the bot with your new_image_name, for example docker run -d -e SLACK_TOKEN=<your_token> new_image_name
Release History

Release History

This version
History Node

6.4.3

History Node

6.4.2

History Node

6.4.1

History Node

6.4.0

History Node

6.2.0

History Node

6.1.0

History Node

6.0.1

History Node

6.0.0

History Node

5.6.3

History Node

5.6.2

History Node

5.6.1

History Node

5.6.0

History Node

5.5.0

History Node

5.4.0

History Node

5.3.0

History Node

5.2.0

History Node

5.1.0

History Node

5.0.3

History Node

5.0.2

History Node

5.0.1

History Node

5.0.0

History Node

4.4.2

History Node

4.4.1

History Node

4.4.0

History Node

4.3.2

History Node

4.3.1

History Node

4.3.0

History Node

4.2.0

History Node

4.1.0

History Node

4.0.1

History Node

4.0.0

History Node

3.8.0

History Node

3.7.1

History Node

3.6.1

History Node

3.6.0

History Node

3.5.2

History Node

3.5.1

History Node

3.5.0

History Node

3.4.2

History Node

3.4.0

History Node

3.2.1

History Node

3.2.0

History Node

3.1.2

History Node

3.1.1

History Node

3.1.0

History Node

3.0.4

History Node

3.0.3

History Node

3.0.2

History Node

3.0.0

History Node

3.0.0a4

History Node

3.0.0a3

History Node

3.0.0a2

History Node

3.0.0a1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
limbo-6.4.3.tar.gz (36.4 kB) Copy SHA256 Checksum SHA256 Source Nov 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting