Fix bugs, add README and Makefile

This commit is contained in:
2026-01-16 20:39:51 +03:00
parent 3e515c66ec
commit a065c6b7be
30 changed files with 695 additions and 286 deletions

View File

@@ -12,15 +12,15 @@ def get_telegram_bot_service(
repositories_container: RepositoriesContainer,
) -> BaseTelegramBotService:
match settings.method:
case TelegramBotMethodEnum.POLLING:
case TelegramBotMethodEnum.POLLING.value:
return TelegramBotPollingService(
settings=settings,
repositories_container=repositories_container,
)
case TelegramBotMethodEnum.WEBHOOK:
case TelegramBotMethodEnum.WEBHOOK.value:
return TelegramBotWebhookService(
settings=settings,
repositories_container=repositories_container,
)
case _:
raise ValueError(f"Cannot create telegram bot with method '{settings.method.value}'")
raise ValueError(f"Cannot create telegram bot with method '{settings.method}'")