HDCon 2022 update
Met een kleine refactor om het volgend jaar makkelijker te maken
This commit is contained in:
+15
-16
@@ -33,31 +33,30 @@ class Shitpost(commands.Cog):
|
|||||||
@commands.command(pass_context=True, hidden=False)
|
@commands.command(pass_context=True, hidden=False)
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def ishetalhdcon(self, ctx):
|
def ishetalhdcon(self, ctx):
|
||||||
"""Hoe lang nog tot Hoestende Dranken Con 2020?
|
"""Hoe lang nog tot Hoestende Dranken Con 2022?
|
||||||
Gebruik: !ishetalhdcon
|
Gebruik: !ishetalhdcon
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
|
|
||||||
Now = datetime.now()
|
Now = datetime.now()
|
||||||
HdConDate = datetime(2021, 9, 3, 4, 0, 1) #om 4 uur lig je toch wel al op bed?
|
HdConDate = datetime(2022, 10, 14, 4, 0, 1) #om 4 uur lig je toch wel al op bed?
|
||||||
Distance = HdConDate - Now
|
Distance = HdConDate - Now
|
||||||
Message = Message = "HD Con 2021 is al voorbij. HD Con 2022 zal in 2022 plaatsvinden." #init
|
Message = Message = "HD Con 2022 is al voorbij. HD Con 2023 zal in 2023 plaatsvinden."
|
||||||
|
if Distance.days == -1:
|
||||||
|
Message = "HD Con 2022 begint vandaag! HYPE!"
|
||||||
|
elif Distance.days < 0 and Distance.days > -4:
|
||||||
|
Message = "HD Con 2022 is nu bezig!!"
|
||||||
|
elif Distance.days == -4:
|
||||||
|
Message = "HD Con 2022 is vandaag alweer afgelopen... F"
|
||||||
|
|
||||||
if Distance.days < 0:
|
if Distance.days < 0:
|
||||||
if Now.month == 9:
|
|
||||||
if Now.day == 3:
|
|
||||||
Message = "HD Con 2021 begint vandaag! HYPE!"
|
|
||||||
elif Now.day == 4 or Now.day == 5:
|
|
||||||
Message = "HD Con 2021 is nu bezig!!"
|
|
||||||
elif Now.day == 6:
|
|
||||||
Message = "HD Con 2021 is vandaag alweer afgelopen... F"
|
|
||||||
yield from ctx.channel.send(ctx.author.mention + ' ' + str(Message))
|
yield from ctx.channel.send(ctx.author.mention + ' ' + str(Message))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
NachtjesSlapen = Distance.days + 1
|
||||||
|
if NachtjesSlapen == 1:
|
||||||
|
Message = "Nog " + str(NachtjesSlapen) + " nachtje slapen..."
|
||||||
else:
|
else:
|
||||||
NachtjesSlapen = Distance.days + 1
|
Message = "Nog " + str(NachtjesSlapen) + " nachtjes slapen..."
|
||||||
if NachtjesSlapen == 1:
|
|
||||||
Message = "Nog " + str(NachtjesSlapen) + " nachtje slapen..."
|
|
||||||
else:
|
|
||||||
Message = "Nog " + str(NachtjesSlapen) + " nachtjes slapen..."
|
|
||||||
|
|
||||||
#Hou bij hoe vaak dit wordt gevraagd:
|
#Hou bij hoe vaak dit wordt gevraagd:
|
||||||
eventsMinutesAgo = 0;
|
eventsMinutesAgo = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user