bot
commited on
Commit
·
c81fa21
1
Parent(s):
130c113
修改分享码格式
Browse files
main.py
CHANGED
@@ -157,7 +157,7 @@ async def start(update: Update, context):
|
|
157 |
"🚀欢迎使用我的机器人!\n\n"
|
158 |
"📋可用命令:\n"
|
159 |
"•直接发送magent:开头的磁力将直接离线下载\n"
|
160 |
-
"
|
161 |
"•/tasks - 查看下载任务\n"
|
162 |
"•/files - 查看文件列表\n"
|
163 |
"•/shares - 查看分享列表\n"
|
@@ -173,7 +173,7 @@ async def help(update: Update, context):
|
|
173 |
"🚀欢迎使用我的机器人!\n\n"
|
174 |
"📋可用命令:\n"
|
175 |
"•直接发送magent:开头的磁力将直接离线下载\n"
|
176 |
-
"
|
177 |
"•/tasks - 查看下载任务\n"
|
178 |
"•/files - 查看文件列表\n"
|
179 |
"•/shares - 查看分享列表\n"
|
@@ -231,7 +231,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
|
231 |
await update.message.reply_text(f"✅操作成功")
|
232 |
else:
|
233 |
await update.message.reply_text(f"❌未成功创建任务,请稍后重试!!")
|
234 |
-
elif text.lower().startswith("
|
235 |
share_id = text.split(":")[1]
|
236 |
result = await THUNDERX_CLIENT.restore(share_id, None, None)
|
237 |
if isinstance(result, str):
|
@@ -504,7 +504,7 @@ async def perform_file_action(
|
|
504 |
result = await THUNDERX_CLIENT.file_batch_share([file_id], False, -1)
|
505 |
share_id = result["share_id"]
|
506 |
if share_id is not None:
|
507 |
-
await update.callback_query.edit_message_text(f"
|
508 |
else:
|
509 |
await update.callback_query.edit_message_text(f"❌分享失败!!")
|
510 |
|
|
|
157 |
"🚀欢迎使用我的机器人!\n\n"
|
158 |
"📋可用命令:\n"
|
159 |
"•直接发送magent:开头的磁力将直接离线下载\n"
|
160 |
+
"•直接发送分享码:开头的分享ID将直接离线下载\n"
|
161 |
"•/tasks - 查看下载任务\n"
|
162 |
"•/files - 查看文件列表\n"
|
163 |
"•/shares - 查看分享列表\n"
|
|
|
173 |
"🚀欢迎使用我的机器人!\n\n"
|
174 |
"📋可用命令:\n"
|
175 |
"•直接发送magent:开头的磁力将直接离线下载\n"
|
176 |
+
"•直接发送分享码:开头的分享ID将直接离线下载\n"
|
177 |
"•/tasks - 查看下载任务\n"
|
178 |
"•/files - 查看文件列表\n"
|
179 |
"•/shares - 查看分享列表\n"
|
|
|
231 |
await update.message.reply_text(f"✅操作成功")
|
232 |
else:
|
233 |
await update.message.reply_text(f"❌未成功创建任务,请稍后重试!!")
|
234 |
+
elif text.lower().startswith("分享码:"):
|
235 |
share_id = text.split(":")[1]
|
236 |
result = await THUNDERX_CLIENT.restore(share_id, None, None)
|
237 |
if isinstance(result, str):
|
|
|
504 |
result = await THUNDERX_CLIENT.file_batch_share([file_id], False, -1)
|
505 |
share_id = result["share_id"]
|
506 |
if share_id is not None:
|
507 |
+
await update.callback_query.edit_message_text(f"分享码:{share_id}")
|
508 |
else:
|
509 |
await update.callback_query.edit_message_text(f"❌分享失败!!")
|
510 |
|