pineafan | 6fb3e07 | 2022-05-20 19:27:23 +0100 | [diff] [blame] | 1 | |
pineafan | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 2 | import { Logger } from './utils/log.js'; |
pineafan | e625d78 | 2022-05-09 18:04:32 +0100 | [diff] [blame] | 3 | import runServer from './api/index.js'; |
| 4 | import Memory from './utils/memory.js'; |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame^] | 5 | import { Guilds, History, ModNotes, EventSchedulerDatabase } from './utils/database.js'; |
pineafan | 6fb3e07 | 2022-05-20 19:27:23 +0100 | [diff] [blame] | 6 | import client from './utils/client.js'; |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame^] | 7 | import EventScheduler from './utils/eventScheduler.js'; |
Skyler Turner | 66ac794 | 2022-02-24 01:59:22 +0000 | [diff] [blame] | 8 | |
| 9 | await client.registerCommandsIn("./commands"); |
pineafan | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 10 | await client.registerEventsIn("./events"); |
pineafan | e625d78 | 2022-05-09 18:04:32 +0100 | [diff] [blame] | 11 | client.on("ready", () => { |
| 12 | runServer(client); |
| 13 | }); |
pineafan | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 14 | |
| 15 | client.logger = new Logger() |
| 16 | client.verify = {} |
pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 17 | client.roleMenu = {} |
pineafan | e625d78 | 2022-05-09 18:04:32 +0100 | [diff] [blame] | 18 | client.memory = new Memory() |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame^] | 19 | client.database = { |
| 20 | guilds: await new Guilds().setup(), |
| 21 | history: await new History().setup(), |
| 22 | notes: await new ModNotes().setup(), |
| 23 | eventScheduler: new EventSchedulerDatabase() |
| 24 | } |
pineafan | 6fb3e07 | 2022-05-20 19:27:23 +0100 | [diff] [blame] | 25 | |
Skyler Turner | 66ac794 | 2022-02-24 01:59:22 +0000 | [diff] [blame] | 26 | await client.login(); |