mirror of https://github.com/stijndcl/didier
Change les to show exam schedule instead because classes are over
parent
7ad53f992c
commit
110ab575b9
|
@ -43,22 +43,41 @@ class School(commands.Cog):
|
||||||
@commands.check(checks.allowedChannels)
|
@commands.check(checks.allowedChannels)
|
||||||
@help.Category(category=Category.School)
|
@help.Category(category=Category.School)
|
||||||
async def les(self, ctx, *day):
|
async def les(self, ctx, *day):
|
||||||
parsed = les.parseArgs(day)
|
embed = discord.Embed(colour=discord.Colour.blue())
|
||||||
|
|
||||||
# Invalid arguments
|
# These are hardcoded because they don't change & don't matter anymore in a month
|
||||||
if not parsed[0]:
|
embed.set_author(name="Examenrooster 2de Bachelor")
|
||||||
return await ctx.send(parsed[1])
|
|
||||||
|
|
||||||
day, dayDatetime, semester, year = parsed[1:]
|
embed.add_field(name="Algoritmen en Datastructuren 2",
|
||||||
|
value="Woensdag 06/01/2021\n13:00 - 16:00\nFlanders Expo, Hal 4D", inline=False)
|
||||||
# Customize the user's schedule
|
embed.add_field(name="Functioneel Programmeren",
|
||||||
schedule = self.customizeSchedule(ctx, year, semester)
|
value="Dinsdag 12/01/2021\n13:00 - 16:00\nFlanders Expo, Hal 5C", inline=False)
|
||||||
|
embed.add_field(name="Systeemprogrammeren",
|
||||||
# Create the embed
|
value="Maandag 18/01/2021\n08:30 - 11:30\nOnline, schriftelijk", inline=False)
|
||||||
embed = les.createEmbed(day, dayDatetime, semester, year, schedule)
|
embed.add_field(name="Communicatienetwerken",
|
||||||
|
value="Vrijdag 22/01/2021\n13:00 - 16:00\nFlanders Expo Hal 4A", inline=False)
|
||||||
|
embed.add_field(name="Statistiek en Probabiliteit",
|
||||||
|
value="Vrijdag 29/01/2021\n08:30 - 11:30\nCampus Ardoyen Locus, PC Resto Locus", inline=False)
|
||||||
|
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
|
# Les code
|
||||||
|
# parsed = les.parseArgs(day)
|
||||||
|
#
|
||||||
|
# # Invalid arguments
|
||||||
|
# if not parsed[0]:
|
||||||
|
# return await ctx.send(parsed[1])
|
||||||
|
#
|
||||||
|
# day, dayDatetime, semester, year = parsed[1:]
|
||||||
|
#
|
||||||
|
# # Customize the user's schedule
|
||||||
|
# schedule = self.customizeSchedule(ctx, year, semester)
|
||||||
|
#
|
||||||
|
# # Create the embed
|
||||||
|
# embed = les.createEmbed(day, dayDatetime, semester, year, schedule)
|
||||||
|
#
|
||||||
|
# await ctx.send(embed=embed)
|
||||||
|
|
||||||
# Add all the user's courses
|
# Add all the user's courses
|
||||||
def customizeSchedule(self, ctx, year, semester):
|
def customizeSchedule(self, ctx, year, semester):
|
||||||
schedule = les.getSchedule(semester, year)
|
schedule = les.getSchedule(semester, year)
|
||||||
|
|
Loading…
Reference in New Issue