Skip to content

A telegram bot to keep track of your darts scores

Notifications You must be signed in to change notification settings

makeri89/dartsbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Darts stats bot

This is a Telegram bot used to keep track of your darts score history.

Usage

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.txt

Before starting the bot, initialize the database

python3 src/db.py

After that start the bot with the command

python3 src/index.py

Testing

Set a .env.test file with the following content.

DATABASE_URL=<test-database-url>

and run tests with

ENV=TRUE pytest src

The bot itself is not tested.

About

A telegram bot to keep track of your darts scores

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published