|
|
|
@@ -0,0 +1,32 @@ |
|
|
|
from datetime import date |
|
|
|
import time |
|
|
|
from fetch_today_date import get_date |
|
|
|
from calcul import calcul |
|
|
|
from config import information |
|
|
|
from discord import webhook |
|
|
|
import sys |
|
|
|
|
|
|
|
date_dest = information['date'] |
|
|
|
|
|
|
|
def main(): |
|
|
|
while 1 : |
|
|
|
print("FarCry 6 daycounter") |
|
|
|
today = date.today() |
|
|
|
dest = get_date(date_dest) |
|
|
|
temps = calcul(today, dest) |
|
|
|
|
|
|
|
if temps == 0 : |
|
|
|
print("Mon role est maintenant terminé... je peux partir en paix..") |
|
|
|
webhook(u" FARCRY sort aujourd'hui ! Bandes de puuuutes. ") |
|
|
|
sys.exit(0) |
|
|
|
else : |
|
|
|
message = "Il reste " + str(temps) + " jours, avant la mort de la vie sociale d'adrien" |
|
|
|
webhook(message) |
|
|
|
time.sleep(86400) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
try : |
|
|
|
main() |
|
|
|
except KeyboardInterrupt : |
|
|
|
print("Fermeture du programme...") |