3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-15 06:05:03 +00:00

feat(mutes): clear old expired mutes for servers that have disabled the mutes plugin

This commit is contained in:
Dragory 2021-10-17 20:12:42 +03:00
parent 66b93dd31c
commit f00a7afab8
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
2 changed files with 16 additions and 1 deletions

View file

@ -35,6 +35,9 @@ export async function runExpiringMutesLoop() {
clearTimeout(timeout);
}
console.log("[EXPIRING MUTES LOOP] Clearing old expired mutes");
await getMutesRepository().clearOldExpiredMutes();
console.log("[EXPIRING MUTES LOOP] Setting timeouts for expiring mutes");
const expiringMutes = await getMutesRepository().getSoonExpiringMutes(LOOP_INTERVAL);
for (const mute of expiringMutes) {