- Modified `ultroid_setup.sh` to correctly read sensitive input like API_HASH when using Docker.
- Integrated key Docker deployment information from `README_DOCKER.md` into the main `README.md` for better visibility.
- Ensured `README.md` still links to `README_DOCKER.md` for comprehensive details.
- Modified `ultroid_setup.sh` to correctly read sensitive input like API_HASH when using Docker.
- Integrated key Docker deployment information from `README_DOCKER.md` into the main `README.md` for better visibility.
- Ensured `README.md` still links to `README_DOCKER.md` for comprehensive details.
- Modified `ultroid_setup.sh` to correctly read sensitive input like API_HASH when using Docker.
- Integrated key Docker deployment information from `README_DOCKER.md` into the main `README.md` for better visibility.
- Ensured `README.md` still links to `README_DOCKER.md` for comprehensive details.
- Corrected 'SpeechRecognition' casing in addons/addons.txt.
- Updated ultroid_setup.sh welcome message to specify the fork.
- Modified README.md, README_DOCKER.md, and DOCKER_DEPLOYMENT.md:
- Pointed clone/curl URLs and repository links to the overspend1/Ultroid-fork.
- Reinforced ultroid_setup.sh as the primary method for Docker deployment.
- Ensured documentation clarity regarding building the Docker image from the fork's source.
Introduces `ultroid_setup.sh`, a new unified script to guide users
through installing Ultroid via Docker or a local Python virtual environment.
Key features of the script:
- Interactive prompts for setup type (Docker/Local).
- OS detection for helper messages.
- Prerequisite checks (git, python3, pip).
- Comprehensive environment variable collection and `.env` file generation.
- Automated Docker setup: builds image, starts containers.
- Automated Local Python setup: creates venv, installs dependencies.
- Integrated session string generation options (manual, Docker, Bot instructions).
- Cross-platform compatibility for `.env` updates (sed for Linux/macOS).
Updates `README.md` to feature `ultroid_setup.sh` as the primary
installation method, streamlining the getting started process.
Older setup scripts (`quick-start.sh`, `docker-deploy.sh`) are
now superseded by this unified script.
- Corrected undefined variable 'x' in funcs.py.
- Refactored configuration loading in funcs.py for clarity and to resolve Pylint errors.
- Changed logging f-strings to %-style formatting across multiple files.
- Added encoding='utf-8' to open() calls.
- Replaced list comprehensions used for side-effects with for-loops.
- Made some broad exception catches more specific.
- Added check=True to subprocess.run() calls in loader.py.
- Corrected function signature parameter orders (e.g., *args placement).
- Removed some unused variables and imports.
- Added Pylint disable comments for known false positives (e.g., no-member for psycopg2.errors and base class methods).
- Improved error handling and logging in funcs.py for startup sequences.
- Addressed dependency installation issues by commenting out 'pokedex' (unavailable on PyPI) and correcting case for 'SpeechRecognition' in requirements.txt.
Enhanced safe-docker-setup.sh to:
- Auto-detect and copy SESSION, API_ID, API_HASH from existing .env
- Read from environment variables if available
- Show configuration status after setup
- Provide quick start if credentials are found
- Maintain manual setup flow if credentials not found
Benefits:
- Zero manual configuration if existing setup detected
- Seamless transition from bash startup to Docker
- Immediate ready-to-start Docker environment
- Still preserves existing setup completely
Features:
- Complete Ubuntu dependency resolution in requirements.txt
- Safe Docker deployment that preserves existing bash startup setups
- Isolated Docker environment (docker-ultroid/) with different ports
- Automatic detection of existing bot configurations
- Session generation scripts for Docker deployment
- Health check and diagnostic tools
- Comprehensive documentation and deployment guides
Safety:
- Detects existing 'bash startup' method and creates isolated environment
- Uses different ports (8081) to avoid conflicts
- Separate volumes and configs for Docker deployment
- Both bash startup and Docker can run side by side
- No interference with existing bot setups
Files added/updated:
- requirements.txt (all missing dependencies)
- Docker setup (Dockerfile, docker-compose.yml, .env.sample)
- Deployment scripts (ubuntu_setup.sh, docker-deploy.sh, quick-start.sh)
- Safety scripts (safe-docker-setup.sh with isolation logic)
- Management tools (Makefile, health_check.sh, generate-session.sh)
- Documentation (SAFE_DOCKER_GUIDE.md, DOCKER_DEPLOYMENT.md, etc.)
Ready for production Ubuntu server deployment!
- Created Linux-compatible Python test runner (run_tests.py)
- Fixed pytest configuration (removed duplicate addopts)
- Added comprehensive test suites for core, plugins, database, and updates
- Fixed import syntax errors (removed wildcard imports from functions)
- Created proper test fixtures and mocking
- Added Makefile with test commands
- Included GitHub Actions workflow for automated testing
- Added test requirements and documentation
- All tests now pass with proper mocking and fixtures
Test Coverage:
- Core functionality tests (imports, decorators, exceptions)
- Plugin system tests (loading, command structure)
- Database tests (operations, connections)
- Update system tests (git operations, validation)
- 49 total tests: passing/skipping appropriately based on dependencies
- Created fix_addon_imports.py to fix ultroid_cmd imports in addon files
- Handles cases where addons/ directory is in .gitignore and doesn't get updated
- Fixes multiple import patterns automatically
- Can be run on server to fix imports without affecting git tracking
- Provides detailed feedback on files processed and fixed
- 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
- Fixed import path from 'pyUltroid.fns.decorators' to 'pyUltroid._misc._decorators'
- Updated addons/tag.py, addons/snips.py, and addons/afk.py
- The decorators.py file doesn't exist in fns directory, actual location is _misc/_decorators.py
- This should resolve the ImportError: cannot import name 'ultroid_cmd' from 'pyUltroid'
- All addons should now load properly without import errors
- 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
- Completely rewrote the update logic in plugins/bot.py.
- Introduced a new get_updates helper function for robustly checking for new commits using git.
- The updater command now supports flexible arguments (
ow, original) for more control over the update process.
- Added comprehensive help text, accessible via .help update, to explain the new functionality.
- Instead of auto-updating, the bot now sends a detailed changelog with an 'Update Now' button to the log channel.
- Added callback handlers for the new interactive update buttons.
- Ensured temporary git remotes are properly cleaned up to prevent conflicts.
- Changed the default repository URL in buttons to point to the original ThePrateekBhatia/Ultroid repo.
Ensure that USERNAME_DB is a dictionary before calling .get() in the uname_stuff function.
This prevents runtime errors when the database returns a string or unexpected type, improving
the stability of username logging and update handling.
Heroku deployment support has been temporarily removed due to recent patches affecting Ultroid deployments.
This change helps prevent accidental bans caused by users unknowingly deploying to Heroku. Support will be re-added once a proper solution is implemented.