🐛 修复 cookies 数据时写入前注册信息判断错误的逻辑问题

This commit is contained in:
洛水居室 2022-09-09 19:30:02 +08:00
parent ec8d70a434
commit b5fad5cf66
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -24,7 +24,7 @@ from utils.models.base import RegionEnum
class AddUserCommandData(TelegramObject):
user: Optional[User] = None
cookies_database_data: Optional[Cookies] = None
region: RegionEnum = RegionEnum.HYPERION
region: RegionEnum = RegionEnum.NULL
cookies: dict = {}
game_uid: int = 0
@ -84,7 +84,7 @@ class SetUserCookies(Plugin.Conversation, BasePlugin.Conversation):
user_info = None
if user_info is not None:
try:
cookies_database_data = await self.cookies_service.get_cookies(user.id, add_user_command_data.region)
cookies_database_data = await self.cookies_service.get_cookies(user.id, region)
add_user_command_data.cookies_database_data = cookies_database_data
except CookiesNotFoundError:
await message.reply_text("你已经绑定UID如果继续操作会覆盖当前UID。")