Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.09 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.09 KB

GT (鸡腿🍗谐音,同时致敬 ET)

Slack app,统计被加的 🍗 数(reaction)。

Inspired by HeyTaco, follow Slack-Python-Onboarding-Tutorial: a simple python onboarding bot and tutorial for Slack.

Setup Database

> GT_DB_NAME="gt" GT_DB_USER="root" GT_DB_HOST="localhost" GT_DB_PORT=3307 GT_DB_PASSWORD=""  pipenv run python commands/create_db_and_tables.py

Setup Environment

> pipenv install -d

Run

> SM_SLACK_API_TOKEN="xxxxxxx" \
  GT_DB_NAME="gt" \
  GT_DB_USER="root" \
  GT_DB_HOST="localhost" \
  GT_DB_PORT=3307 \
  GT_DB_PASSWORD="" \
  YUQUE_USERNAME=username \
  YUQUE_PASSWORD=passowrd \
  ./run

Development

参考 gt/plugins/chickens.py,增加新的 plugin。然后将新写的 plugin 增加到 local_settings.py 即可。

参考文档: http://slack-machine.readthedocs.io/en/latest/plugins/basics.html

Docker

  1. 安装 Docker 与 docker-compose

  2. 执行如下命令

    # docker-compose up --build -d