Command registration (for mini)
diff --git a/src/utils/client.ts b/src/utils/client.ts
index 7d608c7..6aa9b43 100644
--- a/src/utils/client.ts
+++ b/src/utils/client.ts
@@ -1,14 +1,16 @@
-import { Client } from 'discord.js';
+import Discord, { Client, Interaction } from 'discord.js';
import { Logger } from "../utils/log.js";
import Memory from "../utils/memory.js";
import type { VerifySchema } from "../reflex/verify.js";
import { Guilds, History, ModNotes, Premium } from "../utils/database.js";
import EventScheduler from "../utils/eventScheduler.js";
import type { RoleMenuSchema } from "../actions/roleMenu.js";
+import config from "../config/main.json" assert { type: "json" };
class NucleusClient extends Client {
logger = Logger;
+ config: typeof config = config;
verify: Record<string, VerifySchema> = {};
roleMenu: Record<string, RoleMenuSchema> = {};
memory: Memory = new Memory() as Memory;
@@ -20,6 +22,14 @@
premium: Premium;
eventScheduler: EventScheduler;
};
+ // commands: Record<string, {
+ // command: Discord.SlashCommandBuilder |
+ // ((builder: Discord.SlashCommandBuilder) => Discord.SlashCommandBuilder) |
+ // Discord.SlashCommandSubcommandBuilder | ((builder: Discord.SlashCommandSubcommandBuilder) => Discord.SlashCommandSubcommandBuilder) | Discord.SlashCommandSubcommandGroupBuilder | ((builder: Discord.SlashCommandSubcommandGroupBuilder) => Discord.SlashCommandSubcommandGroupBuilder),
+ // callback: (interaction: Interaction) => Promise<void>,
+ // check: (interaction: Interaction) => Promise<boolean> | boolean
+ // }> = {};
+ commands: Discord.Collection<string, [Function, Function]> = new Discord.Collection();
constructor(database: typeof NucleusClient.prototype.database) {
super({ intents: 32767 });