This slack bot helps out with standup meetings via storing teams, sending postscrum messages, and choosing standup orders!
- Make sure that you have collaborater permissions to access the slack app - if you don't have this position, ask Mike.
- Install Python 3,
pip
, andvirtualenv
if you don't already have them. - Clone the repository.
- Create a .env file and add the line
SLACK_BOT_TOKEN="<Token>"
, with<Token>
being replaced by the Bot User Oauth Token found on this page
- Open your terminal and navigate to the standup-slackbot directory
- Type
virtualenv venv
to make a virtual environment called "venv" - Activate the virtual environment with
source venv/bin/activate
- Install requirements:
pip install -r requirements.txt
- Export your slack token:
export SLACK_BOT_TOKEN='(bot user access token)'
You can now run the bot locally with python main.py
or py main.py
.
All commands take input separated by a single space character. Fields that are italicized are optional. Currently the commands supported are as follows:
show <team>
:
- prints a list of the members (with indicators if they have postscrum) in the specified team if it exists
add <team>
@<user>...
:
- adds all mentioned users to the specified team if it exists
remove <team> @<user>
:
- removes the mentioned user from the specified team
showteams:
- prints a list of all existing teams
addteam <team>
:
- creates a new team with the name specified if it does not currently exist
removeteam <team>
:
- deletes the team with the name specified if it exists
backup <option>
:
- manages the backup file
- Options:
showteams
: lists the teams that are currently backed upshow <team>
: shows a specific team's backup settingsadd <team>
: adds the specified team to the backup filerestore <team>
: restores the specified team from the backup fileremove <team>
: removes the specified team from the backup file
sort <team> <SortType> <option>
:
- sorts the members of the specified team (based on username)
- SortTypes:
alpha
: alphabetical orderralpha
: reverse alphabetical orderlength
: length (ascending)rlength
: length (descending)random
: random
- Options:
pickme
: moves the sender to the front of the listlast
: moves the sender to the back of the list@<user>
: moves the specified user to the front of the list
- adds postscrum indicators to users that have reacted to their team's postscrum message
ps <team>
<option>
:
- configures daily postscrum messages (weekdays) for the channel in which the command is sent
- Options:
time
<24-hr time>
: sets the time the message to be sentmessage
<message>
: sets the text of the message to be sentstop
: removes current configuration
- users should react to the message if they have postscrum
advice:
- generates advice
number:
- generates a cool fact about a random number
help:
- brings up a list of all of the functions that the bot supports