testing this for a day if its bad i just wast my time

This commit is contained in:
NoLogicAlan committed 2026-10-05 03:29:05 +03:00
1 parent fd58343ce9
commit 656cbfe149
33 files changed
+726 -102

No files matched your search

+6
View File
@@ -8,8 +8,10 @@
import { logger } from "./src/core/Logger.mjs";
import Remix from "./src/core/Bot.mjs";
import { initErrorChannel, reportCrash } from "./src/core/ErrorChannel.mjs";
import { startHeartbeat } from "./src/core/Heartbeat.mjs";
const remix = new Remix();
startHeartbeat({ isReady: () => Boolean(remix.client?.user) });
initErrorChannel({ config: remix.config, client: remix.client });
@@ -147,6 +149,10 @@ process.on("uncaughtExceptionMonitor", (err, origin) => {
*/
const saveAndExit = async () => {
logger.recovery("\n[Shutdown] Cleaning up before exit...");
setTimeout(() => {
logger.warn("[Shutdown] Cleanup timed out, forcing exit");
process.exit(1);
}, 8000).unref();
try {
await remix.playerState?.saveAllFrom?.(remix.players);
} catch (e) {