- Removed invalid 'pip-requirements' line from requirements.txt that was causing pip errors
- Added config validation before bot restart to prevent startup failures
- Check for essential environment variables (API_ID, API_HASH, SESSION) in .env or config.py
- Prevent restart attempts when configuration is incomplete
- Enhanced error logging with specific config issues
- Update script now validates environment before attempting restart
- Changed Windows commands (copy, del, for loops) to Linux equivalents (cp, rm, find)
- Updated cache cleanup to use find command with proper Linux syntax
- Improved restart mechanism with better error handling and logging
- Added fallback restart method using subprocess.Popen
- Enhanced logging with update_process.log and update_restart.log files
- Added exception handling for restart failures
- Increased shutdown wait time for better process cleanup
- Complete rewrite of update script with better error handling
- Added automatic backup/restore of important config files
- Robust cache cleanup (removes all .pyc and __pycache__ files)
- Uses git reset --hard and clean for conflict-free updates
- Force pull strategy prevents merge conflicts entirely
- Preserves session files, config.py, and .env during updates
- Windows-compatible commands for file operations
- More reliable update process that handles any local changes
- Added stashing mechanism to preserve local changes during update
- Handle untracked files that might conflict (like update_script.py itself)
- Restore local changes and moved files after successful update
- Improved error handling with proper cleanup on failure
- Prevents 'local changes would be overwritten' errors during updates
- Enhanced update_script.py with better error handling and restart logic
- Fixed update command in plugins/bot.py to default to user's fork
- Improved update command help and interactive options
- Fixed import errors in addons/snips.py and addons/tag.py
- All update operations now default to user's fork unless 'original' specified
- Added reliable external script-based update mechanism
- Ensured proper shutdown/restart cycle for updates
- Created update_script.py for reliable external updates
- Modified update command to use external script approach
- Bot now shuts down, launches update script, and restarts automatically
- Added proper repository handling and dependency updates
- Improved update UI with better status messages and buttons
- Fixed issues with in-process updates that could cause corruption
This approach is much more reliable as it:
- Avoids updating files while they're in use
- Properly handles git operations without conflicts
- Ensures clean restart after updates
- Provides better error handling and user feedback