This is a Telegram bot used to keep track of your darts score history.
Make sure you have Python 3.6 or higher and pip on your machine.
Create your own telegram bot and get the token from bot father. Then create a .env file with the following content:
BOT_TOKEN=<your-bot-token-from-bot-father>
SECRET=<secret-string-for-authenticating>
DATABASE_URL=<database-url>
FIGURE_FILE=<filename-for-matplotlib-figure>
Or check the .env.example file for an example. Then create a virtual environment, activate it and install the required packages:
python3 -m venv venv
source venv/bin/activate
pip install -r ./requirements.txtBefore starting the bot, initialize the database
python3 src/db.pyAfter that start the bot with the command
python3 src/index.pySet a .env.test file with the following content.
DATABASE_URL=<test-database-url>
and run tests with
ENV=TRUE pytest srcThe bot itself is not tested.