blob: e66dbb3a1e24400b8b94e4b1edc72bb3743f0499 [file] [log] [blame]
pineafan63fc5e22022-08-04 22:04:10 +01001import { Logger } from "./utils/log.js";
2import runServer from "./api/index.js";
3import Memory from "./utils/memory.js";
4import { Guilds, History, ModNotes, Premium } from "./utils/database.js";
5import client from "./utils/client.js";
6import EventScheduler from "./utils/eventScheduler.js";
Skyler Turner66ac7942022-02-24 01:59:22 +00007
8await client.registerCommandsIn("./commands");
pineafan1dc15722022-03-14 21:27:34 +00009await client.registerEventsIn("./events");
pineafane625d782022-05-09 18:04:32 +010010client.on("ready", () => {
11 runServer(client);
12});
pineafan02ba0232022-07-24 22:16:15 +010013process.on("unhandledRejection", (err) => {
14 console.error(err);
15});
pineafan1dc15722022-03-14 21:27:34 +000016
pineafan63fc5e22022-08-04 22:04:10 +010017client.logger = new Logger();
18client.verify = {};
19client.roleMenu = {};
20client.memory = new Memory();
21client.noLog = [];
pineafan4edb7762022-06-26 19:21:04 +010022client.database = {
23 guilds: await new Guilds().setup(),
24 history: await new History().setup(),
25 notes: await new ModNotes().setup(),
pineafan73a7c4a2022-07-24 10:38:04 +010026 premium: await new Premium().setup(),
27 eventScheduler: await new EventScheduler().start()
pineafan63fc5e22022-08-04 22:04:10 +010028};
pineafan6fb3e072022-05-20 19:27:23 +010029
Skyler Grey75ea9172022-08-06 10:22:23 +010030await client.login();