#grumpycat
Slack bot with some simple utilities
- Set up a new Slack Bot in your Slack Custom Integrations
- username "grumpycat" is suggested
- you can use the profile image/icon from above
- Copy the API token from the bot settings page to your clipboard
- Click this button:
- Paste the API Token in the
SLACK_API_TOKEN
environment variable on Heroku- Optional: set
ADMIN_USERS
and/orBANNED_USERS
environment variables to set permanent Admin users/permanently Banned users
- Optional: set
- Click "Deploy for Free"
- Keeps track of a user's karma
- Usage:
@username++
or@username--
- Code:
/src/events/karma.js
- Decides between two (or more) things
- Usage:
!decide this or that
- Code:
/src/events/decide.js
- Records/retrieves information
- Usage:
- Record info:
!learn [key] as [value]
- Retrieve info:
!info [key]
- Forget info:
!forget [key]
- Search info:
!find [key]
- Does a search on the keys in the database for the queried key.
- Record info:
- Code:
/src/events/info.js
- The permissions modifiers are
isBanned
andisAdmin
- Banned users cannot perform any Karma operations (
@username++
or@username--
). - Admin users have access to the following commands:
!admin ban @username
- bans a user!admin unban @username
- unbans a user!admin promote @username
- promotes a user to Admin!admin demote @username
- demotes a user from Admin!admin setKarma @username [karmaAmount]
- sets karma value on user
- The initial (and permanent) Admin users should be set in a comma-delimited list in the
ADMIN_USERS
environment variable. - You can also optionally set permanently banned users in a comma-delimited list in the
BANNED_USERS
environment variable. - Code:
/src/events/admin.js
- Add new completed tasks with
!done [task]
- Retrieve all completed tasks from today with
!done
- Code:
/src/events/done.js
- Ask grumpycat questions with
@grumpycat [your question here]?
, and he will respond - Code:
/src/events/eightball.js
Submit an issue or open a pull request if you want to help contribute to the project.
(MIT License) - Copyright (c) 2016 Joah Gerstenberg