bot
commited on
Commit
·
215b80a
1
Parent(s):
ff1e26a
fix
Browse files
main.py
CHANGED
@@ -307,7 +307,7 @@ async def tg_show_task(update: Update, context: CallbackContext):
|
|
307 |
keyboard.append(
|
308 |
[
|
309 |
InlineKeyboardButton(
|
310 |
-
f"
|
311 |
callback_data=f"delete_task:{task['id']}",
|
312 |
),
|
313 |
]
|
@@ -401,6 +401,11 @@ async def init_client():
|
|
401 |
TG_BOT_APPLICATION.add_handler(CommandHandler("quota", quota))
|
402 |
TG_BOT_APPLICATION.add_handler(CommandHandler("emptytrash", tg_emptytrash))
|
403 |
TG_BOT_APPLICATION.add_handler(CommandHandler("tasks", tg_show_task))
|
|
|
|
|
|
|
|
|
|
|
404 |
# 处理取消任务操作
|
405 |
TG_BOT_APPLICATION.add_handler(
|
406 |
CallbackQueryHandler(handle_task_cancel, pattern="^cancel_task")
|
|
|
307 |
keyboard.append(
|
308 |
[
|
309 |
InlineKeyboardButton(
|
310 |
+
f"取消操作: {task['name']}",
|
311 |
callback_data=f"delete_task:{task['id']}",
|
312 |
),
|
313 |
]
|
|
|
401 |
TG_BOT_APPLICATION.add_handler(CommandHandler("quota", quota))
|
402 |
TG_BOT_APPLICATION.add_handler(CommandHandler("emptytrash", tg_emptytrash))
|
403 |
TG_BOT_APPLICATION.add_handler(CommandHandler("tasks", tg_show_task))
|
404 |
+
TG_BOT_APPLICATION.add_handler(
|
405 |
+
CallbackQueryHandler(
|
406 |
+
handle_tasks_operation, pattern="^(delete_task|copy_task):"
|
407 |
+
)
|
408 |
+
)
|
409 |
# 处理取消任务操作
|
410 |
TG_BOT_APPLICATION.add_handler(
|
411 |
CallbackQueryHandler(handle_task_cancel, pattern="^cancel_task")
|