Git Product home page Git Product logo

slask's Introduction

Slask

A Slack chatbot

Installation

  1. Clone the repo
  2. pip install -r requirements.txt
  3. Host the web app (a sample wsgi.py is included. See here for more on deployment)
  4. 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/
  1. Setup config values on your environment (see config.py for os-loaded config values)
  2. That's it! Try typing !gif dubstep cat into a chat room monitored by slask

kitten mittens

Heroku

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

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.

These are the current default plugins:

calc


emoji


flip

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.


gif


google (or search)


help


image


karma

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:


map


roll

Roll dice, displaying results.

!roll # rolls 1 d6
!roll 5 # rolls 5 d6
!roll d20 # rolls 1 d20
!roll 5d20 # rolls 5 d20

stock


stockphoto


weather


wiki


youtube


Contributors

  • @kesre

Pre-fork Contributors

  • @akatrevorjay
  • @fsalum
  • @llimllib
  • @rodvodka

slask's People

Contributors

akatrevorjay avatar kesre avatar rod-dot-codes avatar fsalum avatar

Watchers

James Cloos avatar Jeff Hemphill 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.