常青树 Cháng Qīng Shù ("Evergreen Tree")
Jan-Ove is a table tennis bot used at KTH to make sure no loss or win goes forgotten.
How to run
- An MSSQL database (we use an Azure SQL Server at KTH)
- A host with docker installed
Configuration is done through environment variables:
CONNECTION_STRING- An MSSQL ODBC connection string to a sql database. The bundled
Dockerfileinstalls the msodbcsql17 driver, but can easily be modified to install a driver suitable for your need.
SLACK_BOT_TOKEN- The bot app token retrieved from your Slack installation
TRIGGER_TEXT- The text for the bot to trigger on. Default is
DEBUG- Set this to whatever to enable debug logging
- Install docker and make sure it's running
- Create a Slack bot app for your workspace
- Create a file named
.envin the project root with the required environment variables (see above)
docker-compose up --build
How to use
First time usage: Set
active=True for the command
initialize-database in the file
commands.py, start Jan-Ove and then run the
!pingis initialize-database command to create all neccessary tables.
Then invite the bot to a channel or use private messaging and send
!pingis help to get a list of commands.
!pingis register-player @your-slack-handle
!pingis register-player @your-arch-nemesis
!pingis new-season "The new cool season"
- (Play an actual game of table tennis)
!pingis register-result @your-slack-handle @your-arch-nemesis 15 0
- Much win. Such feelings. Great time.
Very limited. To run the few that exist:
pipenv install --dev