Files
autoTeam/README.md
2026-01-08 23:07:12 +08:00

22 lines
607 B
Markdown
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.
## Telegram Bot 适配
本项目已有生成 checkout URL 的逻辑(`autoteam.py``tg_bot.py` 提供 Telegram Bot API 的版本封装。
### 运行
1) 设置环境变量:
- `TG_BOT_TOKEN`BotFather 创建的 bot token必填
- `TG_ALLOWED_USER_IDS`:允许使用的 user_id 白名单(可选,多个用逗号分隔,强烈建议设置)
- `TG_ALLOW_GROUPS=1`:允许在群里使用(可选;默认仅私聊)
2) 启动:
`python bot.py`
`uv run bot.py`
### 使用
- `/gen <access_token>`:生成 checkout URL
- `/id`:查看自己的 `user_id`(用于配置白名单)