v0.2.0-rc1
Pre-release🚀 pytmbot v0.2.0-rc1 Release Notes
We're excited to announce the release of pytmbot v0.2.0-rc1
! This version introduces a complete architectural overhaul, with changes touching every module, method, and class in the bot. Additionally, this release brings support for plugins, enhanced security, Docker container management, and significant performance optimizations. Below is a detailed breakdown of what's new and improved in this release.
✨ New Features
-
Complete Architecture Overhaul:
- Every module, method, and class has been refactored for improved performance, maintainability, and modularity. This overhaul enhances the bot's scalability and prepares it for future expansion.
-
Plugin Management System:
- Implemented a new system for managing plugins, enabling users to easily register and manage custom plugins.
- Monitor Plugin: Monitors server status and health metrics.
- Outline Plugin: Provides basic integration with Outline Server API.
More info: plugins.md
-
Bot Configuration Overhaul:
- The entire bot configuration has been migrated to
pytmbot.yaml
, simplifying setup and management.
- The entire bot configuration has been migrated to
-
Docker Container Management:
- Added basic support for managing Docker containers directly from the bot:
- Start, stop, and restart containers.
- Planned: Container renaming (currently disabled).
- Added basic support for managing Docker containers directly from the bot:
-
Role-based Access Control:
- Introduced support for role separation:
- Regular Users: Standard bot functionality.
- Super Administrators: Elevated privileges for managing advanced features such as container management and log retrieval.
- Introduced support for role separation:
-
2-Factor Authentication (2FA):
- Added a built-in 2FA system to enhance account security during authentication processes. This, in combination with the access control and session management system, restricts access to advanced functionality like Docker container management and log retrieval.
-
Session Management System:
- Implemented a new mechanism for managing user sessions, including automatic cleanup of expired sessions to improve security and performance.
-
Salt Generation Mode:
- The bot container can now be launched in a special mode to generate a cryptographic "salt" for use in the bot configuration, enhancing security.
-
Docker Image Optimization:
- The bot's Docker image has been optimized and compressed to just 16MB, significantly reducing the size without sacrificing functionality.
🛠️ Improvements
-
Inline Handlers Refactor:
- Introduced inline handlers for critical functions, improving responsiveness and modularity.
-
Docker Awareness:
- Added recognition logic to detect if the bot is running in a Docker container, enabling environment-specific optimizations.
-
Custom Jinja2 Filter:
- Added support for custom filters in Jinja2 templates, allowing for more flexible rendering in response templates.
-
Security Enhancements:
- Introduced session expiration cleanup and security locks across all methods to protect sensitive data.
🐛 Bug Fixes
-
Error Handling in Handlers:
- Fixed several errors in bot handlers, ensuring smooth execution and preventing crashes.
-
Plugin Error Fixes:
- Resolved issues in the plugin system to prevent malfunctions when loading or unloading plugins.
-
Session Management:
- Addressed issues with expired sessions, optimizing session locking for better concurrency and improved security.
📚 Documentation Updates
- Updated all documentation, including:
README.md
PLUGINS.md
auth_control.md
security.md
- Docker and CI-related documentation for improved developer guidance.
⬆️ Dependency Updates
- Updated Dependencies:
pydantic
updated for better validation.emoji
updated from2.12.1
to2.13.0
.pytelegrambotapi
updated from4.22.1
to4.23.0
.- Removed unused modules for a leaner dependency list.
🔧 Chores
-
Code Refactoring:
- Significant refactoring across all modules, methods, and classes for improved code structure and maintainability.
-
Code Style Improvements:
- Ensured consistent code formatting and style adherence across the codebase.
-
Version Bump:
- Version bumped to
0.2.0-rc1
to signify this release candidate.
- Version bumped to
Feel free to provide feedback and report any issues here.