This repository has been archived on 2022-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
it-volunteers-for-peace/handlers/projects/__init__.py
2022-10-21 21:06:20 +03:00

22 lines
622 B
Python

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.set_fields
)
dp.register_message_handler(
search.ask_for_project_name, Text("Найти проект")
)
dp.register_message_handler(
search.search_for_projects, state=ProjectStates.search
)