mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-02-23 18:51:29 +02:00
fix(not really): catch working hours errors
This commit is contained in:
parent
04ada3c07b
commit
bb31242d6b
@ -732,6 +732,7 @@ module.exports = class TicketManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const workingHours = category.guild.workingHours;
|
const workingHours = category.guild.workingHours;
|
||||||
const timezone = workingHours[0];
|
const timezone = workingHours[0];
|
||||||
workingHours.shift(); // remove timezone
|
workingHours.shift(); // remove timezone
|
||||||
@ -774,7 +775,6 @@ module.exports = class TicketManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (working && process.env.PUBLIC_BOT !== 'true') {
|
if (working && process.env.PUBLIC_BOT !== 'true') {
|
||||||
let online = 0;
|
let online = 0;
|
||||||
for (const [, member] of channel.members) {
|
for (const [, member] of channel.members) {
|
||||||
@ -793,6 +793,9 @@ module.exports = class TicketManager {
|
|||||||
this.client.keyv.set(`offline/${channel.id}`, Date.now(), ms('1h'));
|
this.client.keyv.set(`offline/${channel.id}`, Date.now(), ms('1h'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.client.log.error(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user