blob: 5f5987ed9c59bd846471dbf7ace438b3d722e892 [file] [log] [blame]
pineafan6fb3e072022-05-20 19:27:23 +01001
pineafan1dc15722022-03-14 21:27:34 +00002import { Logger } from './utils/log.js';
pineafane625d782022-05-09 18:04:32 +01003import runServer from './api/index.js';
4import Memory from './utils/memory.js';
pineafan73a7c4a2022-07-24 10:38:04 +01005import { Guilds, History, ModNotes, Premium } from './utils/database.js';
pineafan6fb3e072022-05-20 19:27:23 +01006import client from './utils/client.js';
pineafan4edb7762022-06-26 19:21:04 +01007import 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
18client.logger = new Logger()
19client.verify = {}
pineafan377794f2022-04-18 19:01:01 +010020client.roleMenu = {}
pineafane625d782022-05-09 18:04:32 +010021client.memory = new Memory()
pineafan73a7c4a2022-07-24 10:38:04 +010022client.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()
pineafan4edb7762022-06-26 19:21:04 +010029}
pineafan6fb3e072022-05-20 19:27:23 +010030
Skyler Turner66ac7942022-02-24 01:59:22 +000031await client.login();