-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
61 lines (50 loc) Β· 1.41 KB
/
Copy pathstart.bat
File metadata and controls
61 lines (50 loc) Β· 1.41 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
setlocal enabledelayedexpansion
echo π Starting CleanAcc Bot...
REM Check if .env exists
if not exist .env (
echo β .env file not found!
echo π Please copy .env.example to .env and configure it
pause
exit /b 1
)
REM Create necessary directories
if not exist logs mkdir logs
if not exist sessions mkdir sessions
if not exist data mkdir data
REM Check Python installation
python --version >nul 2>&1
if errorlevel 1 (
echo β Python is not installed or not in PATH!
echo π‘ Please install Python 3.8+ from https://python.org
pause
exit /b 1
)
REM Install/update dependencies
if not exist .last_install (
echo π¦ Installing dependencies...
pip install -r requirements.txt
echo. > .last_install
) else (
for %%i in (requirements.txt) do set req_time=%%~ti
for %%i in (.last_install) do set install_time=%%~ti
REM Simple time comparison - install if requirements.txt is newer
if "!req_time!" GTR "!install_time!" (
echo π¦ Updating dependencies...
pip install -r requirements.txt
echo. > .last_install
)
)
REM Check Redis connection (optional - will be handled by the app)
echo π Checking system requirements...
REM Set environment for Python
set PYTHONUNBUFFERED=1
REM Start the bot
echo π€ Starting bot...
python main.py
if errorlevel 1 (
echo β Bot exited with error
pause
)
echo π Bot stopped
pause