This commit is contained in:
dela
2026-01-08 23:07:12 +08:00
commit 7eaae93c4f
8 changed files with 537 additions and 0 deletions

22
bot.py Normal file
View File

@@ -0,0 +1,22 @@
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()