420, days/hours/minutes
This commit is contained in:
+8
-3
@@ -5,6 +5,7 @@ from urllib import request
|
||||
import requests
|
||||
import oauth2 as oauth
|
||||
import json, requests
|
||||
import math
|
||||
from datetime import datetime
|
||||
import sys
|
||||
import os
|
||||
@@ -31,9 +32,13 @@ class Shitpost(object):
|
||||
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!!"
|
||||
days = Distance.days #bv 4
|
||||
secondsLeft = (Distance.seconds) - (86400 * days)
|
||||
hours = math.floor(secondsLeft / 3600)
|
||||
secondsLeft = secondsLeft - hours*3600
|
||||
minutes = math.floor(secondsLeft / 60)
|
||||
seconds = secondsLeft - minutes * 60
|
||||
Message += "Nog " + str(days) + " dagen, " + 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)
|
||||
|
||||
Reference in New Issue
Block a user