From ffeda97b655d649b4b47a519973dfe895672a864 Mon Sep 17 00:00:00 2001 From: ZyLacx Date: Fri, 27 Nov 2020 22:46:43 +0100 Subject: [PATCH] Update node.js --- node.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/node.js b/node.js index 1df62d8..5e13ee9 100644 --- a/node.js +++ b/node.js @@ -16,7 +16,7 @@ var remainingMat = mat - now; var remainingDok = dokument - now; var remainingMartin = martinovOdpocet - now; var left = 0; -var ping = 604800; +var ping = 86400; var countdownChannel; var first = true; var setNew = true; @@ -113,8 +113,6 @@ function countdowns(plus) { var february = new Date("February, 2021"); - var lastM = february - now; - remainingSjl = calcTime(sjl - now); remainingMat = calcTime(mat - now); remainingDok = calcTime(dokument - now); @@ -122,12 +120,14 @@ function countdowns(plus) { const embed = new Discord.MessageEmbed() .addField("Čas do odovzdania dokumentácie: ", remainingDok) + .addField("‎", "‎") .addField("Čas do maturity zo Slovenského jazyka: ", remainingSjl) .addField("‎", "‎") .addField("Čas do maturity z Matematiky ", remainingMat) .addField("‎", "‎") - .addField("Martinov nenápadný odpočet: ", remainingMartin); + .addField("Martinov nenápadný odpočet: ", remainingMartin) + .setColor("RANDOM"); left += plus; @@ -156,12 +156,6 @@ function countdowns(plus) { left = 0; countdownChannel.send(embed); } - - if (lastM < 0) - ping = 86400; - - if (remainingDok < 259200000) - ping = 3600; }; function calcTime(time){ @@ -205,4 +199,4 @@ function calcTime(time){ return returnNo; } -client.login(process.env.token); \ No newline at end of file +client.login("NzczMTUyNDgzNzMxNzAxODAw.X6FEXA.y3lIt46kWIAAqf7_zb4xyQvqYcQ"); \ No newline at end of file