🐛 fix get public cookies

This commit is contained in:
xtaodada 2023-01-14 22:45:06 +08:00
parent b590463699
commit 401e55f4bc
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class PublicCookiesService:
else: else:
raise CookieServiceError raise CookieServiceError
try: try:
record_card = await client.get_record_card() record_card = (await client.get_record_cards())[0]
if record_card.game == Game.GENSHIN and region == RegionEnum.HYPERION: if record_card.game == Game.GENSHIN and region == RegionEnum.HYPERION:
await client.get_partial_genshin_user(record_card.uid) await client.get_partial_genshin_user(record_card.uid)
except InvalidCookies as exc: except InvalidCookies as exc:

View File

@ -125,7 +125,7 @@ class SetUserUid(Plugin.Conversation, BasePlugin.Conversation):
else: else:
return ConversationHandler.END return ConversationHandler.END
try: try:
user_info = await client.get_record_card(hoyolab_uid) user_info = (await client.get_record_cards(hoyolab_uid))[0]
except DataNotPublic: except DataNotPublic:
await message.reply_text("角色未公开", reply_markup=ReplyKeyboardRemove()) await message.reply_text("角色未公开", reply_markup=ReplyKeyboardRemove())
logger.warning(f"获取账号信息发生错误 hoyolab_uid[{hoyolab_uid}] 账户信息未公开") logger.warning(f"获取账号信息发生错误 hoyolab_uid[{hoyolab_uid}] 账户信息未公开")