mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
testing this for a day if its bad i just wast my time
This commit is contained in:
1 parent
fd58343ce9
commit
656cbfe149
33 files changed
+726
-102
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user