- Create and get a telegram bot token from @BotFather.
- Create a ".env" file in the project and enter your telegram bot token obtained from @BotFather as indicated in ".env.example".
- Create a "db.db" file in the "database" folder. You will thus create a sqlite database.
- In this database, create 2 tables with the following queries (these queries can be executed in the sqlite database management program: https://sqlitestudio.pl/).
- Run the main.py file
CREATE TABLE users (
username TEXT NOT NULL
UNIQUE,
chat_id INTEGER UNIQUE
NOT NULL,
in_game BOOL NOT NULL
DEFAULT (0),
attempt INTEGER NOT NULL
DEFAULT (0),
num INTEGER NOT NULL
DEFAULT (0)
);
CREATE TABLE users_stat (
user TEXT REFERENCES users (username) ON DELETE CASCADE
NOT NULL,
count_games INTEGER NOT NULL,
wins INTEGER NOT NULL
);