bot commited on
Commit
f77c50f
·
1 Parent(s): 32d7e8c
Files changed (1) hide show
  1. main.py +9 -6
main.py CHANGED
@@ -293,11 +293,11 @@ async def handle_file_cancel(update: Update, context: CallbackContext):
293
  query = update.callback_query
294
  await query.answer()
295
  # 获取取消操作的类型和文件 ID
296
- action, file_id, parent_id = (
297
- query.data.split(":")[0],
298
- query.data.split(":")[1],
299
- query.data.split(":")[2],
300
- )
301
  # 返回文件夹列表
302
  await query.edit_message_text(f"操作已取消")
303
 
@@ -313,6 +313,10 @@ async def handle_file_operation(update: Update, context: CallbackContext):
313
  query.data.split(":")[1],
314
  query.data.split(":")[2],
315
  )
 
 
 
 
316
 
317
  # 需要确认的操作
318
  if action in ["delete_file"]:
@@ -342,7 +346,6 @@ async def perform_file_action(
342
  update: Update, context: CallbackContext, action: str, file_id: str, parent_id: str
343
  ):
344
  if action == "list_file":
345
-
346
  files = await THUNDERX_CLIENT.file_list(100, file_id, "", {})
347
  keyboard = []
348
 
 
293
  query = update.callback_query
294
  await query.answer()
295
  # 获取取消操作的类型和文件 ID
296
+ # action, file_id, parent_id = (
297
+ # query.data.split(":")[0],
298
+ # query.data.split(":")[1],
299
+ # query.data.split(":")[2],
300
+ # )
301
  # 返回文件夹列表
302
  await query.edit_message_text(f"操作已取消")
303
 
 
313
  query.data.split(":")[1],
314
  query.data.split(":")[2],
315
  )
316
+ print(f"{action}------{file_id}========{parent_id}")
317
+
318
+ if parent_id is None:
319
+ parent_id = ""
320
 
321
  # 需要确认的操作
322
  if action in ["delete_file"]:
 
346
  update: Update, context: CallbackContext, action: str, file_id: str, parent_id: str
347
  ):
348
  if action == "list_file":
 
349
  files = await THUNDERX_CLIENT.file_list(100, file_id, "", {})
350
  keyboard = []
351