eu.astrogd.white-leopard/index.ts
2022-11-24 20:15:36 +01:00

21 lines
467 B
TypeScript

import { config } from "dotenv";
import swapConsole from "./src/tools/consoleSwapper";
config();
swapConsole();
import "./src/client/init";
import "./src/commands";
import "./src/events";
import "./src/cli";
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);