mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-21 22:58:05 +00:00
🎨 ask set cookies when public request failed
This commit is contained in:
parent
235f9f349e
commit
a778f78c8a
@ -216,12 +216,12 @@ class BindAccountPlugin(Plugin.Conversation):
|
||||
return ConversationHandler.END
|
||||
except InvalidCookies:
|
||||
await self.public_cookies_service.undo(user.id, cookies, CookiesStatusEnum.INVALID_COOKIES)
|
||||
await message.reply_text("出错了呜呜呜 ~ 请稍后重试")
|
||||
await message.reply_text("出错了呜呜呜 ~ 请稍后重试或者绑定 cookie")
|
||||
return ConversationHandler.END
|
||||
except SimnetBadRequest as exc:
|
||||
if exc.ret_code == 1034:
|
||||
await self.public_cookies_service.undo(user.id)
|
||||
await message.reply_text("出错了呜呜呜 ~ 请稍后重试")
|
||||
await message.reply_text("出错了呜呜呜 ~ 请稍后重试或者绑定 cookie")
|
||||
return ConversationHandler.END
|
||||
await message.reply_text("获取账号信息发生错误", reply_markup=ReplyKeyboardRemove())
|
||||
logger.error("获取账号信息发生错误")
|
||||
|
@ -134,9 +134,8 @@ class AbyssPlugin(Plugin):
|
||||
async with self.helper.public_genshin(user.id) as client:
|
||||
images = await self.get_rendered_pic(client, uid, floor, total, previous)
|
||||
except SimnetBadRequest as exc:
|
||||
if exc.ret_code == 1034 and client.player_id != uid:
|
||||
await message.reply_text("出错了呜呜呜 ~ 请稍后重试")
|
||||
return
|
||||
if exc.ret_code == 1034 and uid and uid != client.player_id:
|
||||
raise CookiesNotFoundError(uid) from exc
|
||||
raise exc
|
||||
except AbyssUnlocked: # 若深渊未解锁
|
||||
await message.reply_text("还未解锁深渊哦~")
|
||||
|
@ -53,9 +53,8 @@ class PlayerStatsPlugins(Plugin):
|
||||
async with self.helper.public_genshin(user.id) as client:
|
||||
render_result = await self.render(client, uid)
|
||||
except SimnetBadRequest as exc:
|
||||
if exc.ret_code == 1034 and uid:
|
||||
await message.reply_text("出错了呜呜呜 ~ 请稍后重试")
|
||||
return
|
||||
if exc.ret_code == 1034 and uid and uid != client.player_id:
|
||||
raise CookiesNotFoundError(uid) from exc
|
||||
raise exc
|
||||
except TooManyRequestPublicCookies:
|
||||
await message.reply_text("用户查询次数过多 请稍后重试")
|
||||
|
Loading…
Reference in New Issue
Block a user