fix: wrong fix

This commit is contained in:
Neko-Life 2021-07-31 12:58:09 +07:00
parent 0d2d178b48
commit b46aa268d5

View file

@ -32,12 +32,12 @@ async function createSchedule(client, { guildID, userID, type, until }) {
},
date: until
};
jobs.push(SC);
try {
await jobManager.remove(NAME).catch(() => { });
if ((until.valueOf() - CHK) < new Date(24 * 60 * 60 * 1000)) {
jobManager.add(SC);
jobs.push(SC);
jobManager.start(NAME);
if (until.valueOf() < CHK) {
console.log("RUNNING IMMEDIATELY");