Skip to content

Commit 515a068

Browse files
committed
chore: don't log plugin load errors on first load
This is to prevent unmaintained guilds/configs from spamming logs.
1 parent 9dbe4b7 commit 515a068

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

backend/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,12 @@ connect().then(async () => {
276276
}
277277
});
278278

279+
let ignorePluginLoadErrors = true;
279280
client.on("error", (err) => {
280281
if (err instanceof PluginLoadError) {
281-
errorHandler(err);
282+
if (!ignorePluginLoadErrors) {
283+
errorHandler(err);
284+
}
282285
return;
283286
}
284287
errorHandler(new DiscordJSError(err.message, (err as any).code, 0));
@@ -411,6 +414,8 @@ connect().then(async () => {
411414
enableProfiling();
412415
}
413416

417+
ignorePluginLoadErrors = false;
418+
414419
initFishFish();
415420

416421
runExpiringMutesLoop();

0 commit comments

Comments
 (0)