new telegram bot

This commit is contained in:
Artem Tsyrulnikov
2025-12-28 15:50:06 +03:00
parent 69179c64be
commit 2fb8c83041
75 changed files with 3719 additions and 1046 deletions

View File

@@ -0,0 +1,24 @@
from typing import TYPE_CHECKING
from src import domain, dto
if TYPE_CHECKING:
from .. import Usecase
async def get_project(self: 'Usecase', input: dto.GetProjectInput) -> dto.ProjectOutput:
project = await self.database.get_project(input.workspace_id, project_id=input.project_id)
if not project:
raise domain.ProjectNotFound()
await project.fetch_related('channel')
return dto.ProjectOutput(
id=project.id,
telegram_id=project.channel.telegram_id,
title=project.channel.title,
username=project.channel.username,
status=project.status,
invite_link_type=project.invite_link_type,
)