• Stars
    star
    402
  • Rank 107,380 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 10 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple, clean, easy to modify Slack chatbot

Limbo

A Slack chatbot

Status

At the moment, I consider limbo to be feature complete, and the project is in maintenance mode. Every once in a while I come in and update the dependencies.

Contributions will be considered and may be accepted, you may want to email me because I might not notice your PR.

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).
  • --version, -v: Print a version number and exit

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

Contributors

More Repositories

1

bloomfilter-tutorial

A Bloom Filter Tutorial
HTML
661
star
2

pymag-trees

Code from the article "Drawing Good-looking Trees" in Python Magazine
Python
173
star
3

roundbracket

A Round NCAA bracket
JavaScript
44
star
4

ytgif

Create a gif from a youtube video with subtitles enabled, using yt-dlp and ffmpeg
Shell
41
star
5

loglevel

Simple levelled logging wrapper around the go "log" module (old and dead: don't use this)
Go
28
star
6

bostonmarathon

Almost complete data dumps from the Boston Marathon, 2001-2014
Jupyter Notebook
28
star
7

soccerdata

A collection of soccer results
Python
27
star
8

chrome-control

A python implementation of the chrome remote debugging protocol
Python
26
star
9

wasm_sqlite_with_stats

Documentation and demonstration of how to build WASM versions of SQLite with extensions embedded
C
23
star
10

ckmeans

ckmeans in python with numpy
Python
21
star
11

refresh-canvas

Code for a talk at Refresh Baltimore on the <canvas> element
JavaScript
20
star
12

ncaa-bracket-randomizer

Uses Ken Pomeroy's College Basketball rankings plus randomness to generate a bracket for you
Jupyter Notebook
18
star
13

aiclass

Code supplemental to Norvig's AI Class (no homework answers!)
Python
15
star
14

gpt-bash-cli

A simple bash interface to openai's API that saves requests and responses to a sqlite database
Shell
14
star
15

Python-Multiline-Lambdas

Hacking the with statement for fun and profit
Python
14
star
16

segment

A golang implementation of Norvig's segmenter
Go
14
star
17

obsidian-guid-plugin

JavaScript
13
star
18

fantasypl

An exploration of computer assistance in Fantasy Soccer
Python
12
star
19

pyphage

A convore chatbot
Python
12
star
20

personal_code

random code that I have lying around
HTML
11
star
21

multidevbox

Deprecated: I no longer use or maintain this. A vagrant box with multiple, reasonably up to date, programming language environments
Shell
11
star
22

ipaddress

A library with some convenient ip address functions in go
Go
10
star
23

fantasypl_stats

Python
10
star
24

champsleagueviz

A Champions League Probability visualization
HTML
9
star
25

zipstips

Zip's Tips was down, so I hosted it for a while, then it came back up so I don't any more
Python
8
star
26

ratesoccer

Python
7
star
27

nbastats

NBA statistics viewer
JavaScript
7
star
28

backupreddituser

Backup a reddit user's comments and submissions
Python
7
star
29

jenks-python

Modernizing and explaining the jenks algorithm
JavaScript
6
star
30

django-recaptcha-comments

A project to make it very easy to include reCAPTCHA-gated comments in a django app
Python
5
star
31

grabcut_js

A secret project that you should be able to figure from the project name - I don't want to be googleable yet
JavaScript
5
star
32

springer

a testing spring83 server
Go
5
star
33

obsidian_notes

Code to turn my obsidian folder into notes.billmill.org
Python
5
star
34

2014collegechamps

2014 USAU College Championships Statistics
5
star
35

viewji

Viewji is a clone of NodeBox in Javascript, using the HTML 5 canvas
JavaScript
5
star
36

covidgraph

JavaScript
4
star
37

observable-plot-template

A template repository to get you started with Observable Plot and typescript
TypeScript
4
star
38

lichesstree

HTML
3
star
39

splunkexpand

expand all splunk expandos
JavaScript
3
star
40

javascript-minibook

A template for creating a game tutorial like http://billmill.org/static/canvastutorial/
JavaScript
3
star
41

portland-revaluation

JavaScript
2
star
42

Spayc

A convore Go serving bot
Python
2
star
43

cherry-blossom

A PyBloxsom-style blog server written in Python+Cherrypy
JavaScript
2
star
44

webcommands

Handy commands for doing web stuff from the command line
Python
2
star
45

hipchat-bettermaker

Making the hipchat web interface better, faster, stronger
JavaScript
2
star
46

llimllib.github.com

llimllib.github.com's source
2
star
47

artists-you-might-like

based on a group of artists, what other artists does last.fm think I might like?
Python
2
star
48

json-schema-tester

A dead simple JSON schema tester for use with @hoxworth's json-schema
JavaScript
1
star
49

caportland

caportland.me website
HTML
1
star
50

js-prettier

DEPRECATED: use w0rp/ale instead. vim plugin to run https://github.com/jlongster/prettier/ on save
Vim Script
1
star
51

hubvan

What I want github news feeds to be. All about vanity.
Python
1
star
52

draw

make some drawings with pyglet
Csound
1
star
53

ctconstitution

Files for CT Constitution stats
Python
1
star
54

blisper

Transcribe audio files to text very rapidly
Go
1
star
55

stravadl

download your strava data
JavaScript
1
star
56

CMUA

The Django website for central maryland's ultimate league
JavaScript
1
star
57

pub

Python Utility Belt - a python Rake-alike
Python
1
star
58

greader_freshair

Google Reader Fresh Air is a Chrome extension that makes Google Reader easier to read and more pleasant to use
JavaScript
1
star
59

Interval-Tree

A very simple interval tree
Python
1
star
60

Base2Tone-gnome-terminal

Base2Tone color schemes for the gnome terminal
Shell
1
star
61

journal

The source code for journal.billmill.org, which reanimates my old tumblr blog via its backup
Go
1
star
62

Sqft

The code for a now-defunct apartment hunting site
Python
1
star
63

yt-transcribe

Transcribe a youtube video into an easily readable HTML file
Shell
1
star
64

Newsite

The code for my new home page
JavaScript
1
star