blob: 0ae917c6ec2b1da468e04b13cb09bc1d6f4dfd41 [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});
pineafan1dc15722022-03-14 21:27:34 +000014
15client.logger = new Logger()
16client.verify = {}
pineafan377794f2022-04-18 19:01:01 +010017client.roleMenu = {}
pineafane625d782022-05-09 18:04:32 +010018client.memory = new Memory()
pineafan73a7c4a2022-07-24 10:38:04 +010019client.noLog = []
pineafan4edb7762022-06-26 19:21:04 +010020client.database = {
21 guilds: await new Guilds().setup(),
22 history: await new History().setup(),
23 notes: await new ModNotes().setup(),
pineafan73a7c4a2022-07-24 10:38:04 +010024 premium: await new Premium().setup(),
25 eventScheduler: await new EventScheduler().start()
pineafan4edb7762022-06-26 19:21:04 +010026}
pineafan6fb3e072022-05-20 19:27:23 +010027
Skyler Turner66ac7942022-02-24 01:59:22 +000028await client.login();