eu.astrogd.white-leopard/index.ts

23 lines
525 B
TypeScript

import { config } from "dotenv";
import swapConsole from "./src/tools/consoleSwapper";
config();
swapConsole();
import "./src/tools/startupTime";
import "./src/client/init";
import "./src/commands";
import "./src/events";
import "./src/cli";
import "./src/service";
import client from "./src/client";
function shutdown() {
console.log("Shutdown request received");
if (client) client.destroy();
process.exit();
}
process.on("SIGINT", shutdown);
process.on("SIGHUP", shutdown);
process.on("SIGTERM", shutdown);