Update node.js

This commit is contained in:
ZyLacx 2020-11-30 11:00:10 +01:00
parent 732846a838
commit c67f4b1916

14
node.js
View file

@ -39,7 +39,7 @@ client.on('message', message => {
let countdownId = message.mentions.channels.first().id; let countdownId = message.mentions.channels.first().id;
countdownChannel = client.channels.cache.get(countdownId); countdownChannel = client.channels.cache.get(countdownId);
if(setNew == true){ if(setNew == true){
var myInterval = setInterval(countdowns, 1000, 1); setInterval(countdowns, 1000, 1);
setNew == false; setNew == false;
} }
else{ else{
@ -126,16 +126,14 @@ function countdowns(plus) {
.addField("", "") .addField("", "")
.addField("Čas do maturity z Matematiky ", remainingMat) .addField("Čas do maturity z Matematiky ", remainingMat)
.addField("", "") .addField("", "")
.addField("Martinov nenápadný odpočet: ", remainingMartin)
.addField("", "")
.addField("Cyberpunk 2077: ", remainingPeter)
.setColor("RANDOM"); .setColor("RANDOM");
if(remainingPeter > 0){ if(remainingPeter < 0){
embed.spliceFields(8); .addField("Cyberpunk 2077: ", remainingPeter);
.addField("", "");
} }
if (remainingMartin > 0) { if (remainingMartin < 0) {
embed.spliceFields(6, 3); .addField("Martinov nenápadný odpočet: ", remainingMartin)
} }
left += plus; left += plus;