Update node.js

This commit is contained in:
ZyLacx 2021-01-03 18:27:37 +01:00
parent 5f83b138ce
commit 56c4333fc2

11
node.js
View file

@ -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);
}