Skip to content
A fun hack that gets Slackbot to force your teammates to work out!
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore updated default.json exercise[units]; updated readme to account for d… Jun 20, 2015
LICENSE
README.md updated Readme to point to new slack urls Dec 13, 2016
User.py Added exception catching for new user? Jun 20, 2015
default.json Toggle officehours feature with boolean Oct 7, 2015
fetchChannelId.py Completely changed the design Jun 20, 2015
requirements.txt added requirements.txt Jun 10, 2015
results.csv created config.json file to save "environmental variables" into Jun 14, 2015
slackbotExercise.py Merge pull request #20 from slinlee/officehours Oct 8, 2015

README.md

slackbot-workout

A fun hack that gets Slackbot to force your teammates to work out!

Instructions

  1. Clone the repo and navigate into the directory in your terminal.

    $ git clone git@github.com:brandonshin/slackbot-workout.git

  2. In the Slack API Page, register yourself an auth token for your team. You should see this. Take note of the token, e.g. xoxp-2751727432-4028172038-5281317294-3c46b1. This is your SLACK_USER_TOKEN_STRING

  3. In the Slackbot Remote control Page. Register an integration by clicking Add Configuration & then you should see this. Make sure you grab just the token out of the url, e.g. AizJbQ24l38ai4DlQD9yFELb. This is your SLACK_URL_TOKEN_STRING

  4. Save your SLACK_USER_TOKEN_STRING and SLACK_URL_TOKEN_STRING as environmental variables in your terminal.

    $ export SLACK_USER_TOKEN_STRING=YOURUSERTOKEN

    $ export SLACK_URL_TOKEN_STRING=YOURURLTOKEN

    If you need help with this, try adapting the first 5 steps of the guide to edit your .bash_profile

  5. Set up channel and customize configurations

    Open default.json and set teamDomain (ex: ctrlla) channelName (ex: general) and channelId (ex: B22D35YMS). Save the file as config.json in the same directory. Set any other configurations as you like.

    If you don't know the channel Id, fetch it using

    $ python fetchChannelId.py channelname

  6. If you haven't set up pip for python, go in your terminal and run. $ sudo easy_install pip

  7. While in the project directory, run

    $ sudo pip install -r requirements.txt

    $ python slackbotExercise.py

Run the script to start the workouts and hit ctrl+c to stop the script. Hope you have fun with it!

You can’t perform that action at this time.