Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedubuddy cog 2024-25 compliance #87

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions cogs/schedubuddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ async def cog_load(self):

def get_term_id(self, year: str, term: str):
match (year.value, term.value):
case ("2023", "Winter"):
return "1820"
case ("2023", "Spring"):
return "1830"
case ("2024", "Summer"):
return "1840"
case ("2023", "Fall"):
return "1850"
case ("2024", "Winter"):
return "1860"
case ("2024", "Spring"):
return "1870"
case ("2024", "Summer"):
return "1880"
case ("2024", "Fall"):
return "1890"
case ("2025", "Winter"):
return "1900"
case _:
return ""

Expand All @@ -192,8 +192,8 @@ def get_term_id(self, year: str, term: str):
@app_commands.describe(year="The year to view the schedule for.")
@app_commands.choices(
year=[
app_commands.Choice(name="2023", value="2023"),
app_commands.Choice(name="2024", value="2024"),
app_commands.Choice(name="2025", value="2025"),
]
)
@app_commands.describe(room="The room to view the schedule for. Eg CAB 239")
Expand Down Expand Up @@ -241,8 +241,8 @@ async def view(
@app_commands.describe(year="The year to view the schedule for.")
@app_commands.choices(
year=[
app_commands.Choice(name="2023", value="2023"),
app_commands.Choice(name="2024", value="2024"),
app_commands.Choice(name="2025", value="2025"),
]
)
@app_commands.describe(
Expand Down