From f842045511cbe5320e29abc5dec522d333441b19 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Sun, 26 Sep 2021 21:27:52 +0200 Subject: [PATCH] Customize les embed if dm --- cogs/school.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cogs/school.py b/cogs/school.py index 044806b..4325057 100644 --- a/cogs/school.py +++ b/cogs/school.py @@ -61,6 +61,11 @@ class School(commands.Cog): if s.semester_over: return await ctx.send("Het semester is afgelopen.") + # DM only shows user's own minor + if ctx.guild is None: + minor_roles = [*schedule.find_minor(self.client, ctx.author.id)] + return await ctx.send(embed=s.create_schedule(minor_roles=minor_roles).to_embed()) + return await ctx.send(embed=s.create_schedule().to_embed()) @commands.command(name="Pin", usage="[Message]")