diff --git a/Shitpost.py b/Shitpost.py index 659f552..4baeb3d 100644 --- a/Shitpost.py +++ b/Shitpost.py @@ -19,6 +19,25 @@ class Shitpost(object): return True @commands.command(pass_context=True, hidden=False) @asyncio.coroutine + def viertwintig(self, ctx): + """Hoe lang nog tot 420? + Gebruik: !420 + """ + #year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0) + Now = datetime.now() + Next420 = datetime(Now.year, 4, 20, 16, 20, 00) + Distance = Next420 - Now + Message = "" + if Distance.days < 0: + Message += "420 is al geweest dit jaar. Blaze het volgend jaar nog eens." + else: + seconds = Distance.seconds % 60 + minutes = (Distance.seconds - seconds)/60 + Message += "Nog " + str(minutes) + " minuten en " + str(seconds) + " seconden tot 420!!" + + yield from ctx.channel.send(ctx.author.mention + ' ' + str(Message)) + @commands.command(pass_context=True, hidden=False) + @asyncio.coroutine def giethetaloan(self, ctx): """Giet het al oan? Ja of Nee.. kom op nou.