Spaces:
Runtime error
Runtime error
| @echo off | |
| echo Starting Discord Bot... | |
| echo. | |
| :: Check if Python is installed and determine command | |
| echo Debug: About to check for 'python' command... | |
| pause | |
| python --version >nul 2>&1 | |
| echo Debug: 'python --version' command executed. ERRORLEVEL is %ERRORLEVEL% | |
| pause | |
| if %ERRORLEVEL% EQU 0 ( | |
| echo Debug: 'python' command found. | |
| set PYTHON_CMD=python | |
| ) else ( | |
| echo Debug: 'python' command failed or not found. About to check for 'python3'... | |
| pause | |
| python3 --version >nul 2>&1 | |
| echo Debug: 'python3 --version' command executed. ERRORLEVEL is %ERRORLEVEL% | |
| pause | |
| if %ERRORLEVEL% EQU 0 ( | |
| echo Debug: 'python3' command found. | |
| set PYTHON_CMD=python3 | |
| ) else ( | |
| echo Error: Python is not installed or not in PATH. Please install Python. | |
| pause | |
| exit /b 1 | |
| ) | |
| ) | |
| echo Debug: Python command determined as: %PYTHON_CMD% | |
| pause | |
| :: Check if dependencies are installed | |
| echo Checking dependencies... | |
| %PYTHON_CMD% -m pip install -r requirements.txt | |
| if %ERRORLEVEL% NEQ 0 ( | |
| echo Error: Dependency installation failed. | |
| pause | |
| exit /b 1 | |
| ) | |
| :: Start the bot | |
| echo Starting the bot... | |
| echo The invite link will be shown after the bot has started. | |
| echo. | |
| %PYTHON_CMD% main.py | |
| echo. | |
| echo Bot script finished or encountered an error. | |
| pause |