Skip to content

Latest commit

 

History

History
96 lines (88 loc) · 3.27 KB

README.md

File metadata and controls

96 lines (88 loc) · 3.27 KB

Team-finder-telegram-bot

The Team Finder Telegram Bot helps users find teammates for different games. It is powered by Redis and MongoDB

Technoogies

  • Redis: Used as temporary storage for quick data access.
  • MongoDB: Serves as the primary database for storing user data.
  • Python-telegram-bot: The main library for interacting with the Telegram API.

Brief overview

Data collection

  1. The bot collects user data, which is then saved to MongoDB

image

User options

  1. After data collection, the user has two options:
    • Create a team
    • search for a team to join

Joining a Team

  1. If the user chooses to join a team, he simply uses the /find command. The bot then tries to find the best match based on the data provided by the user. image

Creating a Team

  1. If the user chooses to create a team, they provide the necessary information to the bot. The bot stores this data in Redis, which saves and indexes it for a certain time (15 minutes by default). During this period, other users can join the team.

image

Structure

.
├── data
│   └── mongodb
├── docker-compose.yaml
├── Dockerfile
├── games.json
├── LICENSE
├── main.py
├── Makefile
├── poetry.lock
├── pyproject.toml
├── README.md
├── src
│   ├── bot
│   │   ├── constants.py
│   │   ├── filters.py
│   │   ├── handlers
│   │   │   ├── base.py
│   │   │   ├── commands.py
│   │   │   ├── conversations.py
│   │   │   └── __init__.py
│   │   ├── __init__.py
│   │   └── utils
│   │       ├── __init__.py
│   │       └── parsers.py
│   ├── common
│   │   ├── config.py
│   │   ├── di.py
│   │   ├── filters.py
│   │   ├── __init__.py
│   │   └── utils.py
│   ├── domain
│   │   ├── entities
│   │   │   ├── games
│   │   │   │   ├── base.py
│   │   │   │   ├── impl.py
│   │   │   │   └── __init__.py
│   │   │   └── __init__.py
│   │   └── __init__.py
│   ├── infra
│   │   ├── __init__.py
│   │   └── repositories
│   │       ├── base.py
│   │       ├── impl.py
│   │       └── __init__.py
│   └── __init__.py
└── tests
    ├── conftest.py
    ├── details
    │   ├── conftest.py
    │   ├── __init__.py
    │   ├── test_mongo_repo.py
    │   └── test_redis_repo.py
    ├── domain
    │   ├── entities
    │   │   ├── conftest.py
    │   │   ├── __init__.py
    │   │   ├── test_games.py
    │   │   ├── test_groups.py
    │   │   └── test_user.py
    │   └── __init__.py
    └── __init__.py