Skip to content

Пример бота обратной связи с использованием БД и «форумов» в Telegram

License

Notifications You must be signed in to change notification settings

Bazulenkov/telegram-feedback-bot-topics

 
 

Repository files navigation

Telegram Feedback Bot - II

🇷🇺 README на русском доступен здесь

⚠️ Warning: project is still under development, use with caution. Issues are greatly appreciated!

A simple Telegram bot which uses Telegram Forums feature to separate different users to different topics. This bot is the result of evolution of my simple stateless feedback bot.

Used technology

  • Python 3.11
  • PostgreSQL 15
  • Redis
  • aiogram 3.x
  • SQLAlchemy 2.x
  • psycopg3 (aka psycopg)
    and more...

Prepare to Run

  • install docker.
  • place your localization files (see relevant README)

Run locally

  • create virtual environment python -m venv venv
  • install dependencies pip install -r requirements.txt
  • change postgres user and password in compose.local.yml
  • fill settings.yml (copy from settings.example.yml)
  • start docker containers with redis and postgres docker compose -f compose.local.yml up -d
  • (first run) apply migrations to DB alembic upgrade head
  • start application python -m bot

Run application in docker fully

  • change postgres user and password in compose.yml
  • fill settings.prod.yml (copy from settings.prod.example.yml)
  • start docker compose docker compose up -d
  • (first run) apply migrations to DB docker compose exec tg_bot alembic upgrade head

P.S. If you get error Could not create new topic error_type=TelegramBadRequest message=Bad Request: not enough rights to create a topic method=CreateForumTopic - Your bot must be an administrator (has permissions to create topics) in your's telegram group.

About

Пример бота обратной связи с использованием БД и «форумов» в Telegram

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.0%
  • Fluent 8.9%
  • Other 2.1%