prevent poll close if event is less than 24h old
All checks were successful
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Successful in 1m15s

This commit is contained in:
2023-06-17 13:03:48 +02:00
parent 07849d331a
commit 4cc332820f
2 changed files with 10 additions and 2 deletions

View File

@ -75,7 +75,7 @@ export class ExtendedClient extends Client {
this.cacheUsers(guilds)
await this.cacheAnnouncementServer(guilds)
this.startAnnouncementRoleBackgroundTask(guilds)
this.startPollCloceBackgroundTasks()
this.startPollCloseBackgroundTasks()
})
} catch (error) {
logger.info(`Error refreshing slash commands: ${error}`)
@ -173,7 +173,7 @@ export class ExtendedClient extends Client {
task.stop()
}
private async startPollCloceBackgroundTasks() {
private async startPollCloseBackgroundTasks() {
for(const guild of this.guilds.cache) {
this.pollCloseBackgroundTasks.set(guild[1].id, schedule("0 * * * * *", () => checkForPollsToClose(guild[1])))
}