Check for semester end

pull/84/head
Stijn De Clercq 2021-08-08 19:32:41 +02:00
parent e9ea063876
commit 85f29e7afa
2 changed files with 5 additions and 1 deletions

View File

@ -54,6 +54,10 @@ class School(commands.Cog):
date = skip_weekends(date)
s = schedule.Schedule(date, int(config.get("year")), int(config.get("semester")), day is not None)
if s.semester_over:
return await ctx.send("Het semester is afgelopen.")
return await ctx.send(embed=s.create_schedule().to_embed())
@commands.command(name="Pin", usage="[Message]")

View File

@ -1,6 +1,6 @@
{
"semester_start": [1, 7, 2021],
"semester_end": [16, 8, 2021],
"semester_end": [1, 8, 2021],
"holidays": [
{
"start_date": [2, 7, 2021, 23, 59, 59],