from loguru import logger from aiogram import types from aiogram.dispatcher import FSMContext from states.project import ProjectStates from services.repositories import Repos, ProjectRepo async def ask_for_project_name(message: types.Message, state: FSMContext): await state.set_state(ProjectStates.search) await message.answer("Введите название проекта") async def search_for_projects( message: types.Message, state: FSMContext, repo: Repos ): await state.reset_state() projects = await repo.get_repo(ProjectRepo).get(message.text) for project in projects: await message.answer( f"{project['name']}\n\n {project['description']}", parse_mode="html" )