From 56c4333fc26fa9c62e0a55fcc0cb2c56b9e5f139 Mon Sep 17 00:00:00 2001 From: ZyLacx Date: Sun, 3 Jan 2021 18:27:37 +0100 Subject: [PATCH] Update node.js --- node.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/node.js b/node.js index d7c0c9c..3c545c1 100644 --- a/node.js +++ b/node.js @@ -28,8 +28,6 @@ var otherChannel; client.once('ready', () => { console.log('Im online!'); countdownChannel = client.channels.cache.find(channel => channel.id === "765243559758397470"); - otherChannel = client.channels.cache.find(channel => channel.id === "490610642106056707"); - otherChannel.send("@everyone \n https://cdn.discordapp.com/attachments/247090228802748426/795334429693575188/judgment_day.mp4") setInterval(countdowns, 1000, 1); }); @@ -109,10 +107,11 @@ client.on('message', message => { function countdowns(plus) { left += plus; - let now = new Date(2021, 8, 10).toDateString; + let now = new Date().toDateString; + if(now == "Fri Sep 10 2021"){ let messageChannel = client.channels.cache.find(channel => channel.id === "490610642106056707"); - messageChannel.send("https://cdn.discordapp.com/attachments/247090228802748426/795334429693575188/judgment_day.mp4"); + messageChannel.send("@everyone \n https://cdn.discordapp.com/attachments/247090228802748426/795334429693575188/judgment_day.mp4"); } if(first == true || plus == 0){ @@ -192,9 +191,7 @@ function sendEmbed(){ .addField("‎", "‎") .addField("Čas do maturity zo Slovenského jazyka: ", remainingSjl) .addField("‎", "‎") - .addField("Čas do maturity z Matematiky ", remainingMat) - .addField("‎", "‎"); - + .addField("Čas do maturity z Matematiky ", remainingMat); countdownChannel.send(embed); }