mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-25 09:37:38 +00:00
🔧 初始化 genshin.Client
时设置注册地区
This commit is contained in:
parent
7b360eb9ce
commit
e40033de02
@ -68,10 +68,11 @@ async def get_genshin_client(user_id: int, user_service: UserService, cookies_se
|
|||||||
game_service = user.default_service
|
game_service = user.default_service
|
||||||
if game_service == ServiceEnum.HYPERION:
|
if game_service == ServiceEnum.HYPERION:
|
||||||
uid = user.yuanshen_game_uid
|
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:
|
else:
|
||||||
uid = user.genshin_game_uid
|
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
|
return client
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user