bot
commited on
Commit
·
bc27f7f
1
Parent(s):
080894c
test
Browse files
main.py
CHANGED
@@ -395,13 +395,6 @@ async def init_client():
|
|
395 |
)
|
396 |
# await TG_BOT_APPLICATION.bot.delete_webhook()
|
397 |
await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
|
398 |
-
await TG_BOT_APPLICATION.initialize()
|
399 |
-
# 将命令处理函数添加到 dispatcher
|
400 |
-
TG_BOT_APPLICATION.add_handler(CommandHandler("start", start))
|
401 |
-
TG_BOT_APPLICATION.add_handler(CommandHandler("help", help))
|
402 |
-
TG_BOT_APPLICATION.add_handler(CommandHandler("quota", quota))
|
403 |
-
TG_BOT_APPLICATION.add_handler(CommandHandler("emptytrash", tg_emptytrash))
|
404 |
-
TG_BOT_APPLICATION.add_handler(CommandHandler("tasks", tg_show_task))
|
405 |
TG_BOT_APPLICATION.add_handler(
|
406 |
CallbackQueryHandler(handle_tasks_operation, pattern="^delete_task:")
|
407 |
)
|
@@ -413,6 +406,12 @@ async def init_client():
|
|
413 |
TG_BOT_APPLICATION.add_handler(
|
414 |
CallbackQueryHandler(handle_task_confirmation, pattern="^confirm_task")
|
415 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
|
418 |
# FastAPI 路由:接收来自 Telegram 的 Webhook 回调
|
|
|
395 |
)
|
396 |
# await TG_BOT_APPLICATION.bot.delete_webhook()
|
397 |
await TG_BOT_APPLICATION.bot.set_webhook(TG_WEBHOOK_URL)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
TG_BOT_APPLICATION.add_handler(
|
399 |
CallbackQueryHandler(handle_tasks_operation, pattern="^delete_task:")
|
400 |
)
|
|
|
406 |
TG_BOT_APPLICATION.add_handler(
|
407 |
CallbackQueryHandler(handle_task_confirmation, pattern="^confirm_task")
|
408 |
)
|
409 |
+
TG_BOT_APPLICATION.add_handler(CommandHandler("start", start))
|
410 |
+
TG_BOT_APPLICATION.add_handler(CommandHandler("help", help))
|
411 |
+
TG_BOT_APPLICATION.add_handler(CommandHandler("quota", quota))
|
412 |
+
TG_BOT_APPLICATION.add_handler(CommandHandler("emptytrash", tg_emptytrash))
|
413 |
+
TG_BOT_APPLICATION.add_handler(CommandHandler("tasks", tg_show_task))
|
414 |
+
await TG_BOT_APPLICATION.initialize()
|
415 |
|
416 |
|
417 |
# FastAPI 路由:接收来自 Telegram 的 Webhook 回调
|