Commit Graph

7 Commits

Author SHA1 Message Date
Cursor User
a527c81c62 Fix addon imports and use startup script for restart
- Fixed ultroid_cmd import in addons/tag.py to use pyUltroid._misc._decorators
- Fixed ultroid_cmd import in addons/snips.py to use correct path
- Fixed ultroid_cmd import in addons/afk.py to use correct path
- Modified update script to use bash startup script for restart instead of direct python
- Added startup script detection and execution for proper bot restart
- This fixes the config error during restart by using the proper startup sequence
2025-06-18 18:10:30 +02:00
Cursor User
79ebb0b0bd Fix dependency and config validation issues
- 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
2025-06-18 18:00:38 +02:00
Cursor User
df2c51df16 Fix update script for Ubuntu/Linux compatibility
- 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
2025-06-18 17:54:56 +02:00
Cursor User
fe810e7ad0 Major update script overhaul - robust conflict handling
- 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
2025-06-18 17:45:22 +02:00
Cursor User
1e02568f49 Fix update script to handle local changes and conflicts
- 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
2025-06-18 17:37:22 +02:00
Cursor User
42275fd6c1 Complete Ultroid update system modernization and addon fixes
- 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
2025-06-18 17:30:48 +02:00
Cursor User
7b1d54a866 feat(update): Implement external script-based update system
- 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
2025-06-18 17:06:30 +02:00