all repos — stealth-developers @ 8bee8ce3815083afdc6fb78059396adc11ac73a8

src/index.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
import config from "./config.ts";
import logger from "./utils/logging.ts";

import { migrateDb } from "./database/index.ts";
import client from "./discord.ts";
import "./server";

async function main() {
	await migrateDb();
	await client.login(config.discord.token);
}

main();

process.on("unhandledRejection", (error) => {
	logger.error(error, "unhandled promise rejection:");
});

process.on("uncaughtException", (error) => {
  logger.error(error, "uncaught exception");
	console.error(error);
});