bot
commited on
Commit
·
5ad7200
1
Parent(s):
293a6dc
fix
Browse files- .DS_Store +0 -0
- main.py +3 -3
- pikpakapi/__init__.py +3 -0
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
main.py
CHANGED
@@ -234,10 +234,10 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
|
234 |
elif text.lower().startswith("share:"):
|
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 |
|
|
|
234 |
elif text.lower().startswith("share:"):
|
235 |
share_id = text.split(":")[1]
|
236 |
result = await THUNDERX_CLIENT.restore(share_id, None, None)
|
237 |
+
if result["share_status_text"] is not None:
|
238 |
+
await update.message.reply_text(f"操作结果:{result['share_status_text']}")
|
239 |
else:
|
240 |
+
await update.message.reply_text(f"❌未成功创建任务:{result},请稍后重试!!")
|
241 |
else:
|
242 |
await update.message.reply_text(f"收到不支持的消息:{text}")
|
243 |
|
pikpakapi/__init__.py
CHANGED
@@ -241,6 +241,9 @@ class PikPakApi:
|
|
241 |
await self.refresh_access_token()
|
242 |
raise PikpakRetryException("Token refreshed, please retry")
|
243 |
|
|
|
|
|
|
|
244 |
raise PikpakException(json_data.get("error_description", "Unknown Error"))
|
245 |
|
246 |
async def _request_get(
|
|
|
241 |
await self.refresh_access_token()
|
242 |
raise PikpakRetryException("Token refreshed, please retry")
|
243 |
|
244 |
+
if json_data.get("error_description") is not None:
|
245 |
+
return json_data.get("error_description")
|
246 |
+
|
247 |
raise PikpakException(json_data.get("error_description", "Unknown Error"))
|
248 |
|
249 |
async def _request_get(
|