eu.astrogd.white-leopard/index.ts
2022-11-24 17:27:56 +01:00

19 lines
414 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 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);