Enhance private handlers structure and add database support
- Introduced a new `PrivateHandlers` class to encapsulate private message handling logic, improving organization and maintainability. - Added new dependencies in `requirements.txt` for database support with `aiosqlite`. - Updated the private handlers to utilize modular components for better separation of concerns and easier testing. - Implemented error handling and logging for improved robustness in message processing.
This commit is contained in:
@@ -1 +1,20 @@
|
||||
from .private_handlers import private_router
|
||||
"""Private handlers package for Telegram bot"""
|
||||
|
||||
from .private_handlers import private_router, create_private_handlers, PrivateHandlers
|
||||
from .services import BotSettings, UserService, PostService, StickerService
|
||||
from .constants import FSM_STATES, BUTTON_TEXTS, ERROR_MESSAGES
|
||||
from .decorators import error_handler
|
||||
|
||||
__all__ = [
|
||||
'private_router',
|
||||
'create_private_handlers',
|
||||
'PrivateHandlers',
|
||||
'BotSettings',
|
||||
'UserService',
|
||||
'PostService',
|
||||
'StickerService',
|
||||
'FSM_STATES',
|
||||
'BUTTON_TEXTS',
|
||||
'ERROR_MESSAGES',
|
||||
'error_handler'
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user