From c19eb4679a4e244fd8d9ab165a572a454903b6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Thu, 16 Mar 2023 11:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20issue=20of=20incorre?= =?UTF-8?q?ct=20account=5Fid=20retrieval?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/account/cookies.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/account/cookies.py b/plugins/account/cookies.py index 9aa3315..95b1600 100644 --- a/plugins/account/cookies.py +++ b/plugins/account/cookies.py @@ -276,8 +276,13 @@ class AccountCookiesPlugin(Plugin.Conversation): except Exception as exc: # pylint: disable=W0703 logger.error("绑定时获取新Cookie失败 [%s]", (str(exc))) finally: + if cookies.user_id is not None: + account_cookies_plugin_data.account_id = cookies.user_id cookies.login_ticket = None cookies.login_uid = None + if account_cookies_plugin_data.account_id is None: + await message.reply_text("无法获取账号ID,请检查Cookie是否正确或请稍后重试") + return ConversationHandler.END genshin_account: Optional[GenshinAccount] = None level: int = 0 # todo : 多账号绑定