🔧 初始化 genshin.Client 时设置注册地区

This commit is contained in:
洛水居室 2022-07-31 15:55:14 +08:00
parent 7b360eb9ce
commit e40033de02
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -68,10 +68,11 @@ async def get_genshin_client(user_id: int, user_service: UserService, cookies_se
game_service = user.default_service
if game_service == ServiceEnum.HYPERION:
uid = user.yuanshen_game_uid
client = genshin.Client(cookies=cookies, game=types.Game.GENSHIN, uid=uid)
client = genshin.Client(cookies=cookies, game=types.Game.GENSHIN, region=types.Region.CHINESE, uid=uid)
else:
uid = user.genshin_game_uid
client = genshin.Client(cookies=cookies, lang="zh-cn", uid=uid)
client = genshin.Client(cookies=cookies,
game=types.Game.GENSHIN, region=types.Region.OVERSEAS, lang="zh-cn", uid=uid)
return client