修复 getuser UID渲染错误

This commit is contained in:
洛水.山岭居室 2022-05-20 00:22:46 +08:00
parent dd2be8d648
commit 2ffef08e3e

View File

@ -29,10 +29,12 @@ class GetUser(BasePlugins):
async def _start_get_user_info(self, user_info: UserInfoData, service: ServiceEnum, uid: int = -1) -> bytes:
if service == ServiceEnum.MIHOYOBBS:
client = genshin.ChineseClient(cookies=user_info.mihoyo_cookie)
uid = user_info.mihoyo_game_uid
if uid <= 0:
uid = user_info.mihoyo_game_uid
else:
client = genshin.GenshinClient(cookies=user_info.hoyoverse_cookie, lang="zh-cn")
uid = user_info.mihoyo_game_uid
if uid <= 0:
uid = user_info.mihoyo_game_uid
try:
user_info = await client.get_user(uid)
except TooManyRequests as error: