mirror of https://github.com/stijndcl/didier
Empty deadlines, fix error, add easter egg
parent
c154a4bb2a
commit
f5e62a0fb9
|
@ -47,10 +47,6 @@ class Deadlines:
|
|||
|
||||
now = time.time()
|
||||
|
||||
if not self.data:
|
||||
embed.description = "Er staan geen deadlines gepland."
|
||||
return embed
|
||||
|
||||
courses: Dict
|
||||
for year, courses in sorted(self.data.items(), key=lambda x: x[0]):
|
||||
content = []
|
||||
|
@ -61,8 +57,14 @@ class Deadlines:
|
|||
content.append(Deadline(course, deadline, t, t < now))
|
||||
|
||||
content.sort(key=lambda x: x.t)
|
||||
content = map(lambda x: str(x), content)
|
||||
content = list(map(lambda x: str(x), content))
|
||||
|
||||
embed.add_field(name=get_edu_year(int(year)), value="\n".join(content), inline=False)
|
||||
if content:
|
||||
embed.add_field(name=get_edu_year(int(year)), value="\n".join(content), inline=False)
|
||||
|
||||
# No deadlines planned
|
||||
if not embed.fields:
|
||||
embed.description = "Er staan geen deadlines gepland."
|
||||
embed.set_image(url="https://c.tenor.com/RUzJ3lDGQUsAAAAC/iron-man-you-can-rest-now.gif")
|
||||
|
||||
return embed
|
||||
|
|
|
@ -1,35 +1,4 @@
|
|||
{
|
||||
"2": {
|
||||
"StatProb": {
|
||||
"Project": 1639090740
|
||||
},
|
||||
"AD2": {
|
||||
"Project": 1638738000
|
||||
},
|
||||
"FuncProg": {
|
||||
"Project 3": 1640104200
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"AD3": {
|
||||
"Project (code)": 1638967062,
|
||||
"Project (verslag)": 1639571862
|
||||
},
|
||||
"AI": {
|
||||
"Presentatie project": 1639870920,
|
||||
"Verslag": 1640386799
|
||||
},
|
||||
"BestSys": {
|
||||
"Linux pract 2": 1638402120,
|
||||
"Linux pract 3": 1639006920
|
||||
},
|
||||
"Modsim": {
|
||||
"Project": 1640386799
|
||||
},
|
||||
"Telecom": {
|
||||
"Keuze artikel": 1638745140,
|
||||
"Presentaties 1": 1639990800,
|
||||
"Presentaties 2": 1640088000
|
||||
}
|
||||
}
|
||||
"2": {},
|
||||
"3": {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue