初始化多平台机器人部署项目 - Telegram/Discord/QQ资源搜索机器人

This commit is contained in:
2026-09-11 11:19:56 +08:00
commit 2253a2d774
21 changed files with 4004 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
@echo off
chcp 65001 >nul
echo ========================================
echo tg-search-bot 部署脚本 (Windows)
echo ========================================
echo.
cd /d "%~dp0"
echo [1/4] 检查Python环境...
python --version
if errorlevel 1 (
echo ❌ 未找到Python,请先安装Python 3.9+
pause
exit /b 1
)
echo.
echo [2/4] 安装依赖...
pip install -r requirements.txt
if errorlevel 1 (
echo ❌ 依赖安装失败
pause
exit /b 1
)
echo.
echo [3/4] 检查配置文件...
set CONFIG_DIR=%USERPROFILE%\.tg_search_bot
if not exist "%CONFIG_DIR%" (
mkdir "%CONFIG_DIR%"
echo 已创建配置目录: %CONFIG_DIR%
)
if not exist "%CONFIG_DIR%\config.yaml" (
echo.
echo ⚠️ 配置文件不存在,请先创建: %CONFIG_DIR%\config.yaml
echo.
echo 配置模板:
echo tg_chat_id: 你的Telegram用户ID
echo tg_bot_token: 你的Bot Token
echo use_proxy: 0
echo enable_nsfw: 0
echo.
pause
exit /b 1
)
echo ✅ 配置文件存在
echo.
echo [4/4] 启动机器人...
echo.
echo ========================================
echo 机器人启动中...
echo 按 Ctrl+C 停止
echo ========================================
echo.
python bot.py
pause