mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 15:36:44 +00:00
🐛 Fix account ID being 0
This commit is contained in:
parent
56cf315747
commit
df8d36da3c
@ -232,10 +232,13 @@ class AccountCookiesPlugin(Plugin.Conversation):
|
|||||||
if client.region == types.Region.CHINESE:
|
if client.region == types.Region.CHINESE:
|
||||||
account_info = await client.get_hoyolab_user()
|
account_info = await client.get_hoyolab_user()
|
||||||
account_id = account_info.hoyolab_id
|
account_id = account_info.hoyolab_id
|
||||||
|
account_cookies_plugin_data.account_id = account_id
|
||||||
cookies.set_v2_uid(account_id)
|
cookies.set_v2_uid(account_id)
|
||||||
logger.success("获取用户 %s[%s] account_id[%s] 成功", user.full_name, user.id, account_id)
|
logger.success("获取用户 %s[%s] account_id[%s] 成功", user.full_name, user.id, account_id)
|
||||||
else:
|
else:
|
||||||
logger.warning("用户 %s[%s] region[%s] 也许是不正确的", user.full_name, user.id, client.region.name)
|
logger.warning("用户 %s[%s] region[%s] 也许是不正确的", user.full_name, user.id, client.region.name)
|
||||||
|
else:
|
||||||
|
account_cookies_plugin_data.account_id = client.cookie_manager.user_id
|
||||||
genshin_accounts = await client.genshin_accounts()
|
genshin_accounts = await client.genshin_accounts()
|
||||||
except DataNotPublic:
|
except DataNotPublic:
|
||||||
logger.info("用户 %s[%s] 账号疑似被注销", user.full_name, user.id)
|
logger.info("用户 %s[%s] 账号疑似被注销", user.full_name, user.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user