bot
commited on
Commit
·
6efccd0
1
Parent(s):
5588a27
fix
Browse files
main.py
CHANGED
@@ -355,38 +355,11 @@ async def perform_file_action(
|
|
355 |
[
|
356 |
InlineKeyboardButton(
|
357 |
f"↩️返回上级",
|
358 |
-
callback_data=f"
|
359 |
),
|
360 |
]
|
361 |
)
|
362 |
# 为每个文件创建按钮和操作选项
|
363 |
-
for file in files["files"]:
|
364 |
-
if file["kind"].lower() == "drive#folder":
|
365 |
-
keyboard.append(
|
366 |
-
[
|
367 |
-
InlineKeyboardButton(
|
368 |
-
f"查看📁: {file['name']}",
|
369 |
-
callback_data=f"list_file:{file['id']}:{file['parent_id']}",
|
370 |
-
),
|
371 |
-
InlineKeyboardButton(
|
372 |
-
f"删除",
|
373 |
-
callback_data=f"delete_file:{file['id']}:{file['parent_id']}",
|
374 |
-
),
|
375 |
-
]
|
376 |
-
)
|
377 |
-
else:
|
378 |
-
keyboard.append(
|
379 |
-
[
|
380 |
-
InlineKeyboardButton(
|
381 |
-
f"下载📄: {file['name']}",
|
382 |
-
callback_data=f"download_file:{file['id']}:{file['parent_id']}",
|
383 |
-
),
|
384 |
-
InlineKeyboardButton(
|
385 |
-
f"删除",
|
386 |
-
callback_data=f"delete_file:{file['id']}:{file['parent_id']}",
|
387 |
-
),
|
388 |
-
]
|
389 |
-
)
|
390 |
|
391 |
reply_markup = InlineKeyboardMarkup(keyboard)
|
392 |
# await update.message.reply_text(f"📋文件列表:", reply_markup=reply_markup)
|
|
|
355 |
[
|
356 |
InlineKeyboardButton(
|
357 |
f"↩️返回上级",
|
358 |
+
callback_data=f"list_file:{parent_id}:{parent_id}",
|
359 |
),
|
360 |
]
|
361 |
)
|
362 |
# 为每个文件创建按钮和操作选项
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
reply_markup = InlineKeyboardMarkup(keyboard)
|
365 |
# await update.message.reply_text(f"📋文件列表:", reply_markup=reply_markup)
|