bot
commited on
Commit
·
2c6a685
1
Parent(s):
fa0d8ed
设置菜单
Browse files
main.py
CHANGED
@@ -495,9 +495,7 @@ async def perform_file_action(
|
|
495 |
download_url = media["link"]["url"]
|
496 |
break
|
497 |
if download_url is not None:
|
498 |
-
await update.callback_query.edit_message_text(
|
499 |
-
f"{download_url}"
|
500 |
-
)
|
501 |
else:
|
502 |
await update.callback_query.edit_message_text(f"❌未找到文件下载地址!!")
|
503 |
elif action == "sh_f":
|
@@ -692,6 +690,18 @@ async def init_client():
|
|
692 |
await TG_BOT_APPLICATION.bot.set_webhook(
|
693 |
url=TG_WEBHOOK_URL, allowed_updates=Update.ALL_TYPES
|
694 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
TG_BOT_APPLICATION.add_handler(
|
696 |
CallbackQueryHandler(handle_tasks_operation, pattern="^delete_task:")
|
697 |
)
|
|
|
495 |
download_url = media["link"]["url"]
|
496 |
break
|
497 |
if download_url is not None:
|
498 |
+
await update.callback_query.edit_message_text(f"{download_url}")
|
|
|
|
|
499 |
else:
|
500 |
await update.callback_query.edit_message_text(f"❌未找到文件下载地址!!")
|
501 |
elif action == "sh_f":
|
|
|
690 |
await TG_BOT_APPLICATION.bot.set_webhook(
|
691 |
url=TG_WEBHOOK_URL, allowed_updates=Update.ALL_TYPES
|
692 |
)
|
693 |
+
|
694 |
+
await TG_BOT_APPLICATION.bot.set_my_commands(
|
695 |
+
commands=[
|
696 |
+
("/start", "开始"),
|
697 |
+
("/tasks", "查看下载任务"),
|
698 |
+
("/files", "查看文件列表"),
|
699 |
+
("/shares", "查看分享列表"),
|
700 |
+
("/quota", "查看存储空间"),
|
701 |
+
("/emptytrash", "清空回收站"),
|
702 |
+
("/help", "获取帮助信息"),
|
703 |
+
]
|
704 |
+
)
|
705 |
TG_BOT_APPLICATION.add_handler(
|
706 |
CallbackQueryHandler(handle_tasks_operation, pattern="^delete_task:")
|
707 |
)
|