A bot that manages the house jobs for Alpha Chi Rho Delta Sigma Phi.
Made by Andrew Kerekon (1126), Brendan Leu (1209), Matt Nickerson (1189)
We recommend running the bot on Python 3.11.7. A useful tool for managing python versions is pyenv.
You may need to port forward the bot server. In production, a static IP and properly forwarded port should be used, but locally a service like ngrok or CloudFlare Tunnels should work fine.
pip install -r requirements.txt
In this directory, place a file called .env which contrains the following vairables:
SLACK_BOT_TOKEN="" # The token for the slack bot
SLACK_SIGNING_SECRET="" # The signing secret token for the slack app
APP_NAME="TomberTron" # The start command used with the bot
CHANNEL_ID="" # The ID of the slack channel to make announcements in
# PRODUCTION (used with waitress)
SERVER_IP="localhost" # The IP to run the server on
SERVER_PORT="3000" # The port to run the server on
Refer to this guide.
The events should go to /slack/events. For example, if you are using a port forwarding service such as ngrok it would look something like: https://example.ngrok-free.app/slack/events
Refer to this guide.
Place credentials.json in this directory. Run the bot and the first time a request to Google Sheets is made, you will see a sign in link in the console. Click it and sign in with Google, then token.json should appear.
The ID of the Google Sheet to be used is in bot/sheets_data.py in a variable called SPREADSHEET_ID.
python server.py
flask --app bot run --debug -p 3000
ngrok http --domain="{{ DOMAIN HERE }}" 3000
If people dont follow these so be it, but try your best.
- Actions begin with the name of the flow they belong to such that they follow a format of
flow-action; for example:signoff-begininsignoff.py.