From dd60840576931bf3b5f62230e84a8c2fa9555b3c Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Mon, 29 Nov 2021 22:06:02 +0100 Subject: [PATCH] Fix embed sorting & inlining --- data/embeds/deadlines.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/embeds/deadlines.py b/data/embeds/deadlines.py index 59bcb74..6fc8e1d 100644 --- a/data/embeds/deadlines.py +++ b/data/embeds/deadlines.py @@ -52,7 +52,7 @@ class Deadlines: return embed courses: Dict - for year, courses in self.data.items(): + for year, courses in sorted(self.data.items(), key=lambda x: x[0]): content = [] deadlines: Dict[str, int] @@ -63,6 +63,6 @@ class Deadlines: content.sort(key=lambda x: x.t) content = map(lambda x: str(x), content) - embed.add_field(name=get_edu_year(int(year)), value="\n".join(content)) + embed.add_field(name=get_edu_year(int(year)), value="\n".join(content), inline=False) return embed