blob: 7d608c7fa4473e4611b251f5a28b7ac4b3067108 [file] [log] [blame]
PineaFan64486c42022-12-28 09:21:04 +00001import { Client } from 'discord.js';
2import { Logger } from "../utils/log.js";
3import Memory from "../utils/memory.js";
4import type { VerifySchema } from "../reflex/verify.js";
5import { Guilds, History, ModNotes, Premium } from "../utils/database.js";
6import EventScheduler from "../utils/eventScheduler.js";
7import type { RoleMenuSchema } from "../actions/roleMenu.js";
pineafan6fb3e072022-05-20 19:27:23 +01008
PineaFan64486c42022-12-28 09:21:04 +00009
10class 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
30const client = new NucleusClient({
31 guilds: new Guilds(),
32 history: new History(),
33 notes: new ModNotes(),
34 premium: new Premium(),
35 eventScheduler: new EventScheduler()
36});
pineafan6fb3e072022-05-20 19:27:23 +010037
Skyler Grey75ea9172022-08-06 10:22:23 +010038export default client;
PineaFan64486c42022-12-28 09:21:04 +000039export { NucleusClient };