PineaFan | 64486c4 | 2022-12-28 09:21:04 +0000 | [diff] [blame^] | 1 | import { Client } from 'discord.js'; |
| 2 | import { Logger } from "../utils/log.js"; |
| 3 | import Memory from "../utils/memory.js"; |
| 4 | import type { VerifySchema } from "../reflex/verify.js"; |
| 5 | import { Guilds, History, ModNotes, Premium } from "../utils/database.js"; |
| 6 | import EventScheduler from "../utils/eventScheduler.js"; |
| 7 | import type { RoleMenuSchema } from "../actions/roleMenu.js"; |
pineafan | 6fb3e07 | 2022-05-20 19:27:23 +0100 | [diff] [blame] | 8 | |
PineaFan | 64486c4 | 2022-12-28 09:21:04 +0000 | [diff] [blame^] | 9 | |
| 10 | class NucleusClient extends Client { |
| 11 | logger = Logger; |
| 12 | verify: Record<string, VerifySchema> = {}; |
| 13 | roleMenu: Record<string, RoleMenuSchema> = {}; |
| 14 | memory: Memory = new Memory() as Memory; |
| 15 | noLog: string[] = []; |
| 16 | database: { |
| 17 | guilds: Guilds; |
| 18 | history: History; |
| 19 | notes: ModNotes; |
| 20 | premium: Premium; |
| 21 | eventScheduler: EventScheduler; |
| 22 | }; |
| 23 | |
| 24 | constructor(database: typeof NucleusClient.prototype.database) { |
| 25 | super({ intents: 32767 }); |
| 26 | this.database = database; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | const client = new NucleusClient({ |
| 31 | guilds: new Guilds(), |
| 32 | history: new History(), |
| 33 | notes: new ModNotes(), |
| 34 | premium: new Premium(), |
| 35 | eventScheduler: new EventScheduler() |
| 36 | }); |
pineafan | 6fb3e07 | 2022-05-20 19:27:23 +0100 | [diff] [blame] | 37 | |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 38 | export default client; |
PineaFan | 64486c4 | 2022-12-28 09:21:04 +0000 | [diff] [blame^] | 39 | export { NucleusClient }; |