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

feat: replace Phisherman with FishFish

This commit is contained in:
Dragory 2025-05-31 18:12:07 +00:00
parent bf08cade15
commit 8c2058821f
No known key found for this signature in database
13 changed files with 202 additions and 475 deletions

View file

@ -21,6 +21,7 @@ import { RecoverablePluginError } from "./RecoverablePluginError.js";
import { SimpleError } from "./SimpleError.js";
import { AllowedGuilds } from "./data/AllowedGuilds.js";
import { Configs } from "./data/Configs.js";
import { FishFishError, initFishFish } from "./data/FishFish.js";
import { GuildLogs } from "./data/GuildLogs.js";
import { LogType } from "./data/LogType.js";
import { hasPhishermanMasterAPIKey } from "./data/Phisherman.js";
@ -142,6 +143,12 @@ function errorHandler(err) {
return;
}
if (err instanceof FishFishError) {
// FishFish errors are not critical, so we just log them
console.error(`[FISHFISH] ${err.message}`);
return;
}
// tslint:disable:no-console
console.error(err);
@ -402,6 +409,8 @@ connect().then(async () => {
enableProfiling();
}
initFishFish();
runExpiringMutesLoop();
await sleep(10 * SECONDS);
runExpiringTempbansLoop();
@ -419,13 +428,6 @@ connect().then(async () => {
runExpiredMemberCacheDeletionLoop();
await sleep(10 * SECONDS);
runMemberCacheDeletionLoop();
if (hasPhishermanMasterAPIKey()) {
await sleep(10 * SECONDS);
runPhishermanCacheCleanupLoop();
await sleep(10 * SECONDS);
runPhishermanReportingLoop();
}
});
let lowestGlobalRemaining = Infinity;