bot
commited on
Commit
·
45edb0f
1
Parent(s):
9de56be
Test
Browse files
main.py
CHANGED
@@ -134,8 +134,7 @@ def help(update: Update, context):
|
|
134 |
@app.on_event("startup")
|
135 |
async def init_client():
|
136 |
global THUNDERX_CLIENT
|
137 |
-
global
|
138 |
-
global TG_DISPATHER
|
139 |
if not os.path.exists("thunderx.txt"):
|
140 |
THUNDERX_CLIENT = PikPakApi(
|
141 |
username=THUNDERX_USERNAME,
|
@@ -166,7 +165,6 @@ async def init_client():
|
|
166 |
print("未设置TG_BOT_TOKEN无法实现TG机器人功能!")
|
167 |
else:
|
168 |
TG_BOT_APPLICATION = Application.builder().token(TG_BOT_TOKEN).build()
|
169 |
-
print(TG_WEBHOOK_URL)
|
170 |
await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
|
171 |
# 将命令处理函数添加到 dispatcher
|
172 |
TG_BOT_APPLICATION.add_handler(CommandHandler("start", start))
|
|
|
134 |
@app.on_event("startup")
|
135 |
async def init_client():
|
136 |
global THUNDERX_CLIENT
|
137 |
+
global TG_BOT_APPLICATION
|
|
|
138 |
if not os.path.exists("thunderx.txt"):
|
139 |
THUNDERX_CLIENT = PikPakApi(
|
140 |
username=THUNDERX_USERNAME,
|
|
|
165 |
print("未设置TG_BOT_TOKEN无法实现TG机器人功能!")
|
166 |
else:
|
167 |
TG_BOT_APPLICATION = Application.builder().token(TG_BOT_TOKEN).build()
|
|
|
168 |
await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
|
169 |
# 将命令处理函数添加到 dispatcher
|
170 |
TG_BOT_APPLICATION.add_handler(CommandHandler("start", start))
|