File size: 1,344 Bytes
b93b587
 
 
 
 
f15ea60
 
b93b587
f15ea60
 
b93b587
f15ea60
b93b587
 
f15ea60
 
b93b587
f15ea60
 
b93b587
f15ea60
b93b587
 
f15ea60
b93b587
 
 
 
f15ea60
 
b93b587
 
 
 
f15ea60
 
 
 
 
b93b587
 
 
 
 
 
f15ea60
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@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