A fun hack that gets Slackbot to force your teammates to work out!
-
Clone the repo and navigate into the directory in your terminal.
$ git clone git@github.com:brandonshin/slackbot-workout.git
-
Go to your slack home page https://{yourgroup}.slack.com/home & click on Integrations on the left sidebar.
-
Scroll All the Way Down until you see Slack API and Slackbot. You'll need two access these two integrations.
-
In the Slack API Page, select WebAPI in the left side bar, scroll all the way down, and register yourself an auth token. You should see this. Take note of that token, e.g.
xoxp-2751727432-4028172038-5281317294-3c46b1
. That's your User Auth Token -
In the Slackbot (Remote control page). Register an integration & you should see this. Make sure you grab just the token out of the url, e.g.
AizJbQ24l38ai4DlQD9yFELb
-
Open the
slackbotExercise.py
in a text editor and set the URLTOKENSTRING and USERAUTHTOKEN with the tokens that you got from the Slackbot Remote Control and Slack Web API, respectively. -
If you haven't set up pip for python, go in your terminal and run.
$ sudo easy_install pip
-
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!