from aiogram import Dispatcher from aiogram.dispatcher.filters import Text from states.project import ProjectStates from . import create, search def register_projects_handlers(dp: Dispatcher): dp.register_message_handler( create.ask_for_project_fields, Text("Создать проект") ) dp.register_message_handler( create.create_project, state=ProjectStates.create ) dp.register_message_handler( search.ask_for_project_name, Text("Найти проект") ) dp.register_message_handler( search.search_for_projects, state=ProjectStates.search )