blob: 22436e26781bcdecbccee2e0bcb7fbc8e2248c90 [file] [log] [blame]
pineafan6fb3e072022-05-20 19:27:23 +01001
pineafan63fc5e22022-08-04 22:04:10 +01002import { Logger } from "./utils/log.js";
3import runServer from "./api/index.js";
4import Memory from "./utils/memory.js";
5import { Guilds, History, ModNotes, Premium } from "./utils/database.js";
6import client from "./utils/client.js";
7import EventScheduler from "./utils/eventScheduler.js";
Skyler Turner66ac7942022-02-24 01:59:22 +00008
9await client.registerCommandsIn("./commands");
pineafan1dc15722022-03-14 21:27:34 +000010await client.registerEventsIn("./events");
pineafane625d782022-05-09 18:04:32 +010011client.on("ready", () => {
12 runServer(client);
13});
pineafan02ba0232022-07-24 22:16:15 +010014process.on("unhandledRejection", (err) => {
15 console.error(err);
16});
pineafan1dc15722022-03-14 21:27:34 +000017
pineafan63fc5e22022-08-04 22:04:10 +010018client.logger = new Logger();
19client.verify = {};
20client.roleMenu = {};
21client.memory = new Memory();
22client.noLog = [];
pineafan4edb7762022-06-26 19:21:04 +010023client.database = {
24 guilds: await new Guilds().setup(),
25 history: await new History().setup(),
26 notes: await new ModNotes().setup(),
pineafan73a7c4a2022-07-24 10:38:04 +010027 premium: await new Premium().setup(),
28 eventScheduler: await new EventScheduler().start()
pineafan63fc5e22022-08-04 22:04:10 +010029};
pineafan6fb3e072022-05-20 19:27:23 +010030
Skyler Turner66ac7942022-02-24 01:59:22 +000031await client.login();