bot
commited on
Commit
·
7e68dfe
1
Parent(s):
9efcdc8
fix
Browse files
main.py
CHANGED
@@ -313,10 +313,6 @@ async def handle_file_operation(update: Update, context: CallbackContext):
|
|
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,8 +342,6 @@ async def perform_file_action(
|
|
346 |
update: Update, context: CallbackContext, action: str, file_id: str, parent_id: str
|
347 |
):
|
348 |
|
349 |
-
print(f"123========{type(parent_id)}abc================")
|
350 |
-
|
351 |
if action == "list_file":
|
352 |
files = await THUNDERX_CLIENT.file_list(100, file_id, "", {})
|
353 |
keyboard = []
|
@@ -355,14 +349,6 @@ async def perform_file_action(
|
|
355 |
if files["files"] is None:
|
356 |
await update.message.reply_text("❌未找到文件!!")
|
357 |
else:
|
358 |
-
keyboard.append(
|
359 |
-
[
|
360 |
-
InlineKeyboardButton(
|
361 |
-
f"返回上级",
|
362 |
-
callback_data=f"list_file:{parent_id}:{parent_id}",
|
363 |
-
),
|
364 |
-
]
|
365 |
-
)
|
366 |
# 为每个文件创建按钮和操作选项
|
367 |
for file in files["files"]:
|
368 |
if file["kind"].lower() == "drive#folder":
|
|
|
313 |
query.data.split(":")[1],
|
314 |
query.data.split(":")[2],
|
315 |
)
|
|
|
|
|
|
|
|
|
316 |
|
317 |
# 需要确认的操作
|
318 |
if action in ["delete_file"]:
|
|
|
342 |
update: Update, context: CallbackContext, action: str, file_id: str, parent_id: str
|
343 |
):
|
344 |
|
|
|
|
|
345 |
if action == "list_file":
|
346 |
files = await THUNDERX_CLIENT.file_list(100, file_id, "", {})
|
347 |
keyboard = []
|
|
|
349 |
if files["files"] is None:
|
350 |
await update.message.reply_text("❌未找到文件!!")
|
351 |
else:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
# 为每个文件创建按钮和操作选项
|
353 |
for file in files["files"]:
|
354 |
if file["kind"].lower() == "drive#folder":
|