A Slack chatbot
- Clone the repo
pip install -r requirements.txt
- Host the web app (a sample wsgi.py is included. See here for more on deployment)
- Add the URL where you deployed the web app as an outgoing webhook. Here's what my configuration looks like:
Channel: Any
Keyword(s): !, slaskbot
URL(s): https://<app_name>.herokuapp.com/
- Setup config values on your environment (see config.py for os-loaded config values)
- That's it! Try typing
!gif dubstep cat
into a chat room monitored by slask
You can host for free on Heroku. Sign up and follow the steps below to deploy the app.
heroku create
git push heroku master
heroku ps:scale web=1
heroku ps
heroku logs
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.
These are the current default plugins:
Different from the llimllib flip, the bot will flip / unflip text
kesre: !flip me
slaskbot (bot): (ノಠ益ಠ)ノ彡 ǝɹsǝʞ
kesre: !unflip me
slaskbot (bot): kesre ノ( º _ ºノ)
Most text can be flipped. By default (or by specifying 'table'), a table will be flipped.
Modify or view the karma of a thing. Relies on other commands using a space after the command to avoid hook collisions.
Usage:
!<name>++
!<name>--
!karma <name>
!karma
kesre: !karma chameleon
slaskbot (bot): No karma for chameleon
kesre: !chameleon++
slaskbot (bot): chameleon: 1
kesre: !karma chameleon
slaskbot (bot): chameleon: 1
kesre: !karma
slaskbot (bot): Best Karma: chameleon: 1 Worst Karma:
Roll dice, displaying results.
!roll # rolls 1 d6
!roll 5 # rolls 5 d6
!roll d20 # rolls 1 d20
!roll 5d20 # rolls 5 d20
- @kesre
- @akatrevorjay
- @fsalum
- @llimllib
- @rodvodka