🎨 Update Handle InvalidCookies Exception

This commit is contained in:
洛水居室 2023-01-07 15:27:00 +08:00
parent 738e94d9ed
commit 98db3fe755
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
2 changed files with 3 additions and 5 deletions

View File

@ -249,14 +249,14 @@ class AvatarListPlugin(Plugin, BasePlugin):
await notice.delete()
await client.get_genshin_user(client.uid)
logger.warning("用户 %s[%s] 无法请求角色数数据 API返回信息为 [%s]%s", user.full_name, user.id, exc.retcode, exc.original)
reply_message = await message.reply_text("出错了呜呜呜 ~ 当前账号无法请求角色数数据。\n请尝试登录通行证,在账号管理里面选择账号游戏信息,将原神设置为默认角色")
reply_message = await message.reply_text("出错了呜呜呜 ~ 当前访问令牌无法请求角色数数据请尝试重新获取Cookie")
if filters.ChatType.GROUPS.filter(message):
self._add_delete_message_job(context, reply_message.chat_id, reply_message.message_id, 30)
self._add_delete_message_job(context, message.chat_id, message.message_id, 30)
return
except GenshinException as e:
if e.retcode == -502002:
await notice.delete()
if e.retcode == -502002:
reply_message = await message.reply_html("请先在米游社中使用一次<b>养成计算器</b>后再使用此功能~")
self._add_delete_message_job(context, reply_message.chat_id, reply_message.message_id, 20)
return

View File

@ -130,9 +130,7 @@ class Ledger(Plugin, BasePlugin):
logger.warning(
"用户 %s[%s] 无法请求旅行札记数据 API返回信息为 [%s]%s", user.full_name, user.id, exc.retcode, exc.original
)
reply_message = await message.reply_text(
"出错了呜呜呜 ~ 当前账号无法请求旅行札记数据。\n请尝试登录通行证,在账号管理里面选择账号游戏信息,将原神设置为默认角色。"
)
reply_message = await message.reply_text("出错了呜呜呜 ~ 当前访问令牌无法请求角色数数据请尝试重新获取Cookie。")
if filters.ChatType.GROUPS.filter(message):
self._add_delete_message_job(context, reply_message.chat_id, reply_message.message_id, 30)
self._add_delete_message_job(context, message.chat_id, message.message_id, 30)