intra_max_chatbot/run.bat

27 lines
724 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
title Support Bot
:: Переходим в папку скрипта
cd /d "%~dp0"
:: Активируем venv если есть
if exist "venv\Scripts\activate.bat" (
call venv\Scripts\activate.bat
) else if exist ".venv\Scripts\activate.bat" (
call .venv\Scripts\activate.bat
)
:: Устанавливаем зависимости если нужно (раскомментировать при первом запуске)
:: pip install -r requirements.txt
echo [INFO] Запуск... Admin-панель: http://localhost:8080/admin/
echo.
python main.py
if %ERRORLEVEL% neq 0 (
echo.
echo [ОШИБКА] Бот завершился с кодом %ERRORLEVEL%
pause
)