blob: eac8818e381af1fcb7a726f0e6f97769f74022e4 [file] [log] [blame]
pineafan63fc5e22022-08-04 22:04:10 +01001import runServer from "./api/index.js";
pineafan63fc5e22022-08-04 22:04:10 +01002import client from "./utils/client.js";
PineaFan64486c42022-12-28 09:21:04 +00003import config from "./config/main.json" assert { type: "json" };
4import register from "./utils/commandRegistration/register.js";
Skyler Turner66ac7942022-02-24 01:59:22 +00005
pineafane625d782022-05-09 18:04:32 +01006client.on("ready", () => {
PineaFan64486c42022-12-28 09:21:04 +00007 console.log(`Logged in as ${client.user!.tag}!`);
8 register();
pineafane625d782022-05-09 18:04:32 +01009 runServer(client);
10});
pineafan02ba0232022-07-24 22:16:15 +010011process.on("unhandledRejection", (err) => {
12 console.error(err);
13});
pineafan1dc15722022-03-14 21:27:34 +000014
PineaFan64486c42022-12-28 09:21:04 +000015if (config.enableDevelopment) { await client.login(config.developmentToken); }
16else { await client.login(config.token); }