bot
commited on
Commit
·
a25ef75
1
Parent(s):
38a02cd
离线分享
Browse files
main.py
CHANGED
@@ -156,7 +156,8 @@ async def start(update: Update, context):
|
|
156 |
commands = (
|
157 |
"🚀欢迎使用我的机器人!\n\n"
|
158 |
"📋可用命令:\n"
|
159 |
-
"•直接发送magent
|
|
|
160 |
"•/tasks - 查看下载任务\n"
|
161 |
"•/files - 查看文件列表\n"
|
162 |
"•/shares - 查看分享列表\n"
|
@@ -171,7 +172,8 @@ async def help(update: Update, context):
|
|
171 |
commands = (
|
172 |
"🚀欢迎使用我的机器人!\n\n"
|
173 |
"📋可用命令:\n"
|
174 |
-
"•直接发送magent
|
|
|
175 |
"•/tasks - 查看下载任务\n"
|
176 |
"•/files - 查看文件列表\n"
|
177 |
"•/shares - 查看分享列表\n"
|
@@ -229,6 +231,13 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
|
229 |
await update.message.reply_text(f"✅操作成功")
|
230 |
else:
|
231 |
await update.message.reply_text(f"❌未成功创建任务,请稍后重试!!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
else:
|
233 |
await update.message.reply_text(f"收到不支持的消息:{text}")
|
234 |
|
|
|
156 |
commands = (
|
157 |
"🚀欢迎使用我的机器人!\n\n"
|
158 |
"📋可用命令:\n"
|
159 |
+
"•直接发送magent:开头的磁力将直接离线下载\n"
|
160 |
+
"•直接发送share:开头的分享将直接离线下载\n"
|
161 |
"•/tasks - 查看下载任务\n"
|
162 |
"•/files - 查看文件列表\n"
|
163 |
"•/shares - 查看分享列表\n"
|
|
|
172 |
commands = (
|
173 |
"🚀欢迎使用我的机器人!\n\n"
|
174 |
"📋可用命令:\n"
|
175 |
+
"•直接发送magent:开头的磁力将直接离线下载\n"
|
176 |
+
"•直接发送share:开头的分享将直接离线下载\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("magnet:"):
|
235 |
+
share_id = text.split(":")[1]
|
236 |
+
result = await THUNDERX_CLIENT.restore(share_id, None, None)
|
237 |
+
if result is not None:
|
238 |
+
await update.message.reply_text(f"✅操作成功")
|
239 |
+
else:
|
240 |
+
await update.message.reply_text(f"❌未成功创建任务,请稍后重试!!")
|
241 |
else:
|
242 |
await update.message.reply_text(f"收到不支持的消息:{text}")
|
243 |
|