Files
AutoDoneTeam/reference/bot.py
dela d146ad9ebd feat: 添加完整的 Telegram Bot 和欧洲账单生成功能
主要更新:
-  新增 Telegram Bot 交互界面
-  新增欧洲账单自动生成功能
- 📦 整理项目结构,部署文件移至 deployment/ 目录
- 📝 完善文档,新增 CHANGELOG 和 Bot 部署指南
- 🔧 统一使用 pyproject.toml 管理依赖(支持 uv)
- 🛡️  增强 .gitignore,防止敏感配置泄露

新增文件:
- tg_bot.py: Telegram Bot 主程序
- generate_billing.py: 独立账单生成工具
- modules/billing.py: 欧洲账单生成模块
- deployment/: Docker、systemd 等部署配置
- docs/: 完整的文档和更新日志

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 09:59:13 +08:00

23 lines
654 B
Python
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.
from tg_bot import run
TG_BOT_TOKEN = "8355194422:AAG0LkYBuclLu6EYzG7gKq2np5233WTTfgk"
TG_ALLOWED_USER_IDS = None # 改成你的 user_id想放开就设为 None
TG_ALLOW_GROUPS = False
def main() -> None:
token = TG_BOT_TOKEN.strip()
if not token or token == "PASTE_YOUR_BOT_TOKEN_HERE":
raise SystemExit("Please set TG_BOT_TOKEN in bot.py")
allowed = TG_ALLOWED_USER_IDS
if allowed is not None and not isinstance(allowed, set):
raise SystemExit("TG_ALLOWED_USER_IDS must be a set[int] or None")
run(token=token, allowed_user_ids=allowed, allow_groups=TG_ALLOW_GROUPS)
if __name__ == "__main__":
main()