feat(settings): group commands by category in system tab

This commit is contained in:
syntaxbullet
2026-01-08 22:55:40 +01:00
parent 8fe300c8a2
commit bea6c33024
5 changed files with 56 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ import { EventLoader } from "@lib/loaders/EventLoader";
export class Client extends DiscordClient {
commands: Collection<string, Command>;
knownCommands: Set<string>;
knownCommands: Map<string, string>;
lastCommandTimestamp: number | null = null;
maintenanceMode: boolean = false;
private commandLoader: CommandLoader;
@@ -17,7 +17,7 @@ export class Client extends DiscordClient {
constructor({ intents }: { intents: number[] }) {
super({ intents });
this.commands = new Collection<string, Command>();
this.knownCommands = new Set<string>();
this.knownCommands = new Map<string, string>();
this.commandLoader = new CommandLoader(this);
this.eventLoader = new EventLoader(this);
}

View File

@@ -72,7 +72,7 @@ export class CommandLoader {
command.category = category;
// Track all known commands regardless of enabled status
this.client.knownCommands.add(command.data.name);
this.client.knownCommands.set(command.data.name, category);
const isEnabled = config.commands[command.data.name] !== false;