blob: ca14cdb036c85669129208dc60dec8d2d3ec6f1c [file] [log] [blame]
pineafan6fb3e072022-05-20 19:27:23 +01001
pineafandd1155e2022-02-26 22:06:12 +00002import config from './config/main.json' assert {type: 'json'};
pineafan1dc15722022-03-14 21:27:34 +00003import { Logger } from './utils/log.js';
pineafane625d782022-05-09 18:04:32 +01004import runServer from './api/index.js';
5import Memory from './utils/memory.js';
pineafan6fb3e072022-05-20 19:27:23 +01006import Database from './utils/database.js';
7import client from './utils/client.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()
pineafan6fb3e072022-05-20 19:27:23 +010019client.database = await new Database(config.mongoUrl).connect()
20
Skyler Turner66ac7942022-02-24 01:59:22 +000021await client.login();