Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor imports and logging in multiple files for consistency and clarity. Updated README.md to simplify bot token description. Enhanced error logging format across handlers for improved debugging. Consolidated model imports in database and service modules for better organization. * Refactor song handling to track handling across the bot. Updated README.md for clarity. Replaced 'Song' with 'Track' in multiple files, including handlers, services, and models. Enhanced user interaction by updating inline keyboards and search functionalities to reflect the change from songs to tracks. Improved localization for new track terminology in English and Russian. This update streamlines the bot's functionality and improves user experience. * Add configuration management and restructure bot modules - Introduced a new `configs.py` file for centralized configuration management, replacing the previous `app/configs.py`. - Updated `main.py` to utilize the new configuration structure for bot token and database settings. - Removed the old `app/__init__.py` and `app/configs.py` files to streamline the codebase. - Created new modules in the `bot` directory, including handlers, filters, and utilities, to enhance modularity and organization. - Implemented various bot handlers for menu, language selection, search functionality, and track management, improving user interaction and experience. - Added middleware for authentication and internationalization, ensuring user data is managed effectively and language preferences are respected. This update enhances the bot's architecture, making it more maintainable and scalable for future features. * Enhance language and menu handlers for improved user interaction - Updated language and menu handlers to support both message and callback query events, streamlining the handling of user inputs. - Refactored error handling to provide clearer logging for debugging purposes. - Revised README.md to include a new feature for auto-detecting user language and clarified demo link description. * Enhance localization and user language selection features - Updated README.md to clarify multi-language support with flag icons and improved formatting for deployment and database management sections. - Modified language handler to utilize gettext for language selection prompts, enhancing user experience based on language preferences. - Added new localization entries for language selection prompts in both English and Russian, ensuring consistent messaging across languages. * Refactor database configuration and search handling for improved functionality - Changed the DBConfig class to use a property for constructing the database URL, enhancing encapsulation. - Updated the get_all_from_page_handler to clarify variable names and improve readability. - Added input validation in the search_handler to ensure search queries are trimmed and within a valid length. - Enhanced error handling in the CRUD class to rollback sessions on exceptions, improving database reliability. - Added new localization entries for search query errors in both English and Russian, improving user feedback. * Implement subscription management features in the bot - Added a new NotSubbedFilter to check if users are subscribed to required channels. - Created a subscription handler to prompt users for subscription if not already subscribed. - Introduced a SubscriptionRequired model to manage required subscriptions in the database. - Updated inline keyboard functionality to include subscription prompts. - Enhanced logging and error handling in subscription-related operations. - Added localization entries for subscription messages in English and Russian. * Enhance configuration management and localization support - Added timezone configuration in `configs.py` and updated Docker setup to utilize the TIMEZONE environment variable. - Refactored `NotSubbedFilter` to clarify subscription checks and updated localization messages for user prompts in English and Russian. - Improved database session handling with new timeout and recycle settings in `engine.py`. - Updated `auth_middleware.py` to use SQLAlchemy's `func.now()` for timestamp updates. - Introduced a maximum file size limit for downloads in the `Music` service, enhancing error handling for large files. * Refactor subscription management and improve logging - Updated the subscription management system by renaming the SubscriptionRequired model to RequiredSubscriptions for clarity. - Enhanced the NotSubbedFilter and subscription handler to utilize the new model, ensuring accurate subscription checks. - Improved logging in the NotSubbedFilter to capture errors when fetching chat information. - Refined logging configuration in main.py for better message formatting. - Updated localization messages for subscription prompts in both English and Russian to enhance user experience.
- Loading branch information