Skip to content

Latest commit

 

History

History
82 lines (71 loc) · 2.23 KB

README.md

File metadata and controls

82 lines (71 loc) · 2.23 KB

Simple telegram chat manager


PyPI - Python Version Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Installation

1) Add .env file to project root

Example of .env file

BOT_TOKEN=token
ADMIN_ID=123
CHAT_ID=-101
CHANNEL_ID=-102
CHANNEL_USERNAME=channel_username
MODERATOR_USERNAME=moderator_username
DB_NAME=db_name
DB_USER=db_user
DB_PASSWORD=db_password
DB_HOST=localhast
DB_PORT=3107

2) Run project

docker compose up --build

Architecture

/
│   .env
│   .gitignore
│   poetry.lock
│   pyproject.toml
│   README.md
│
├───monitoring_bot
│   │   constants.py
│   │   database.py
│   │   main.py    <- base module
│   │   utils.py
│   │   __init__.py
│   │
│   └───handlers
│       │   admin.py
│       │   chat.py
│       │   filters.py
│       │   user.py
│       └───__init__.py
│
└───tests
    │   conftest.py
    │   test_database.py
    └───__init__.py

Tasks:

  • Handle chats joins (and rejoins)
  • Handle channels lefts
  • Handle chats lefts
  • Ask a people when entering a chat to make sure they are not bots
  • Provide info for me about every participant of channel/chat
  • Collect and send data about who react on messages (is it possible in telegram? - No)
  • For admin: show banned users and unban users
  • For admin: ban users
  • For admin: receive different message types from users: docs, geo, files, etc
  • Deny user messages if they aren't subscribed on a channel
  • Это же каких размеров должен быть разум, чтобы проводить тесты на продовой бд? 🤡