bot commited on
Commit
0e7afb6
·
1 Parent(s): 48126c0
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -165,9 +165,10 @@ async def init_client():
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
  print("==========test==============")
170
  print(TG_BOT_APPLICATION.bot.webhook)
 
 
171
  # 将命令处理函数添加到 dispatcher
172
  TG_BOT_APPLICATION.add_handler(CommandHandler("start", start))
173
  TG_BOT_APPLICATION.add_handler(CommandHandler("help", help))
 
165
  print("未设置TG_BOT_TOKEN无法实现TG机器人功能!")
166
  else:
167
  TG_BOT_APPLICATION = Application.builder().token(TG_BOT_TOKEN).build()
 
168
  print("==========test==============")
169
  print(TG_BOT_APPLICATION.bot.webhook)
170
+ await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
171
+
172
  # 将命令处理函数添加到 dispatcher
173
  TG_BOT_APPLICATION.add_handler(CommandHandler("start", start))
174
  TG_BOT_APPLICATION.add_handler(CommandHandler("help", help))