A tea bot for Slack.
- register - Registers the tea preference of a user (
@teabot register green tea
) - brew - Initiates the brewing process (users have 120 seconds to respond) and takes an optional argument to limit the number of cups to brew (
@teabot brew
or@teabot brew 5
) - me - Reply with
@teabot me
when someone has offered to brew - leaderboard - Displays the current leaderboard based on tea cups brewed (
@teabot leaderboard
) - stats - Displays the stats for all users (
@teabot stats
) or (@teabot stats @george
) for a single user - nominate - Nominate someone to brew tea. You must brew tea more than %s times to use this (
@teabot nominate @george
) - update_users -> Update teabot's user registry based on changes in your Slack team (
@teabot update_users
)
- Go to Slack's App & Integrations > Manage > Custom Integrations and add a new Bot called teabot.
- Create a virtualenv and load it.
- On the repository's root type
pip install -r requirements.txt
. - Export your slack secret key
export SLACK_WEBHOOK_SECRET="mysecretslackkey"
. - Initialize the database
python init_db.py
. You can configure the path to the sqlite DB in conf.py. - Start the app
python src/app.py
.
- Load your virtualenv.
- Install test required pip packages
pip install -r requirements_test.txt
. - From the repository's root type
python -m unittest discover
.