bot
commited on
Commit
·
4dc70a5
1
Parent(s):
3ef2f45
finx
Browse files
main.py
CHANGED
@@ -336,7 +336,7 @@ async def perform_file_action(
|
|
336 |
if files["files"] is None:
|
337 |
await update.message.reply_text("❌未找到文件!!")
|
338 |
else:
|
339 |
-
if files["files"]["parent_id"] is not None:
|
340 |
keyboard.append(
|
341 |
[
|
342 |
InlineKeyboardButton(
|
@@ -379,7 +379,21 @@ async def perform_file_action(
|
|
379 |
await update.callback_query.edit_message_text(
|
380 |
f"📋文件列表:", reply_markup=reply_markup
|
381 |
)
|
382 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
|
384 |
#################### 离线任务处理 ##########################
|
385 |
# 确认操作的回调
|
|
|
336 |
if files["files"] is None:
|
337 |
await update.message.reply_text("❌未找到文件!!")
|
338 |
else:
|
339 |
+
if files["files"][0]["parent_id"] is not None:
|
340 |
keyboard.append(
|
341 |
[
|
342 |
InlineKeyboardButton(
|
|
|
379 |
await update.callback_query.edit_message_text(
|
380 |
f"📋文件列表:", reply_markup=reply_markup
|
381 |
)
|
382 |
+
elif action == "download_file":
|
383 |
+
result = await THUNDERX_CLIENT.get_download_url(file_id)
|
384 |
+
download_url = result['web_content_link']
|
385 |
+
for media in result["medias"]:
|
386 |
+
if media['link']['url'] is not None:
|
387 |
+
download_url = media['link']['url']
|
388 |
+
break
|
389 |
+
if download_url is not None:
|
390 |
+
await update.callback_query.edit_message_text(
|
391 |
+
f"📋文件下载地址:{download_url}"
|
392 |
+
)
|
393 |
+
else:
|
394 |
+
await update.callback_query.edit_message_text(
|
395 |
+
f"❌未找到文件下载地址!!"
|
396 |
+
)
|
397 |
|
398 |
#################### 离线任务处理 ##########################
|
399 |
# 确认操作的回调
|