diff --git a/crenata/application/commands/school/__init__.py b/crenata/application/commands/school/__init__.py index b848a77..7448453 100644 --- a/crenata/application/commands/school/__init__.py +++ b/crenata/application/commands/school/__init__.py @@ -3,8 +3,8 @@ from crenata.application.commands.school.meal import meal from crenata.application.commands.school.search import search from crenata.application.commands.school.setup import setup -from crenata.application.commands.school.users import users from crenata.application.commands.school.timetable import timetable +from crenata.application.commands.school.users import users school = app_commands.Group(name="학교", description="학교 관련 명령어입니다.") @@ -12,4 +12,4 @@ school.add_command(search) school.add_command(setup) school.add_command(users) -school.add_command(timetable) \ No newline at end of file +school.add_command(timetable) diff --git a/crenata/application/commands/school/setup.py b/crenata/application/commands/school/setup.py index c7aaaad..25c31ef 100644 --- a/crenata/application/commands/school/setup.py +++ b/crenata/application/commands/school/setup.py @@ -34,7 +34,7 @@ async def setup( school = await school_page(interaction, schools, ephemeral=True) school_info = SchoolInfo( - school_name=school.name, + name=school.name, grade=grade, room=room, edu_office_code=school.edu_office_code, diff --git a/crenata/application/commands/school/users.py b/crenata/application/commands/school/users.py index 0fca4ad..2de6ff3 100644 --- a/crenata/application/commands/school/users.py +++ b/crenata/application/commands/school/users.py @@ -1,8 +1,9 @@ -from discord.interactions import Interaction from discord import app_commands +from discord.interactions import Interaction + from crenata.application.client import Crenata from crenata.application.embeds.users import school_users_embed_builder -from crenata.core.user.usecases.get import GetUserUseCase, GetAllSameSchoolUsersUseCase +from crenata.core.user.usecases.get import GetAllSameSchoolUsersUseCase, GetUserUseCase from crenata.infrastructure.sqlalchemy.user.domain.repository import UserRepositoryImpl diff --git a/crenata/core/strings.py b/crenata/core/strings.py index 586ddd9..a4a9e80 100644 --- a/crenata/core/strings.py +++ b/crenata/core/strings.py @@ -3,21 +3,15 @@ class Strings: USER_NOT_FOUND = "가입되지 않은 사용자입니다." DUPLICATE_USER = "이미 가입된 사용자입니다." - MEAL_NAME_NOT_FOUND = ( - "해당하는 식사 명을 찾을 수 없습니다. 조식, 중식, 석식 중에 다시 선택해 주시길" - " 바랍니다." - ) + MEAL_NAME_NOT_FOUND = "해당하는 식사 명을 찾을 수 없습니다. 조식, 중식, 석식 중에 다시 선택해 주시길 바랍니다." USER_CANCELLED = "취소되었습니다." VIEW_TIMEOUT = "시간 초과되었습니다." NEED_SCHOOL_REGISTER = "학교를 먼저 등록해 주시기 바랍니다." DATE_PARSE_ERROR = ( - "날짜를 잘못 입력했습니다. YYYYMMDD 형식, 또는 '내일'로 입력해 주시길 바랍니다." - " 예: 20220110, 내일" - ) - INTERACTION_LOCKED = ( - "다른 명령어을 사용 중일 때는 해당 명령어를 사용할 수 없습니다." + "날짜를 잘못 입력했습니다. YYYYMMDD 형식, 또는 '내일'로 입력해 주시길 바랍니다. 예: 20220110, 내일" ) + INTERACTION_LOCKED = "다른 명령어을 사용 중일 때는 해당 명령어를 사용할 수 없습니다." MUST_BE_GREATER_THAN_ZERO = "학년 또는 반은 0보다 커야합니다." NOT_INTERACTED_USER = "다른 사용자의 상호작용은 사용할 수 없습니다." diff --git a/crenata/infrastructure/neispy/timetable/domain/entity.py b/crenata/infrastructure/neispy/timetable/domain/entity.py index f17dfa4..5d7a12c 100644 --- a/crenata/infrastructure/neispy/timetable/domain/entity.py +++ b/crenata/infrastructure/neispy/timetable/domain/entity.py @@ -1,11 +1,10 @@ from dataclasses import dataclass from neispy.domain.elstimetable import ElsTimeTableRow -from neispy.domain.mistimetable import MisTimeTableRow from neispy.domain.histimetable import HisTimeTableRow +from neispy.domain.mistimetable import MisTimeTableRow from neispy.domain.spstimetable import SpsTimeTableRow - from crenata.core.timetable.domain.entity import Timetable from crenata.infrastructure.utils.datetime import to_datetime