Files
telegram-helper-bot/helper_bot/handlers/group/__init__.py
Andrey 8cee629e28 Add middleware and refactor admin handlers for improved functionality
- Introduced `DependenciesMiddleware` and `BlacklistMiddleware` for enhanced request handling across all routers.
- Refactored admin handlers to utilize new middleware, improving access control and error handling.
- Updated the `admin_router` to include middleware for access checks and streamlined the process of banning users.
- Enhanced the structure of admin handler imports for better organization and maintainability.
- Improved error handling in various admin functions to ensure robust user interactions.
2025-08-28 23:54:17 +03:00

48 lines
899 B
Python

"""Group handlers package for Telegram bot"""
# Local imports - main components
from .group_handlers import (
group_router,
create_group_handlers,
GroupHandlers
)
# Local imports - services
from .services import (
AdminReplyService,
DatabaseProtocol
)
# Local imports - constants and utilities
from .constants import (
FSM_STATES,
ERROR_MESSAGES
)
from .exceptions import (
NoReplyToMessageError,
UserNotFoundError
)
from .decorators import error_handler
__all__ = [
# Main components
'group_router',
'create_group_handlers',
'GroupHandlers',
# Services
'AdminReplyService',
'DatabaseProtocol',
# Constants
'FSM_STATES',
'ERROR_MESSAGES',
# Exceptions
'NoReplyToMessageError',
'UserNotFoundError',
# Utilities
'error_handler'
]