feat: add getCommands and getCategories

This commit is contained in:
2026-01-14 02:31:44 -03:00
parent 7c282105d3
commit 4718e68c78
+9 -1
View File
@@ -10,7 +10,7 @@ import {
} from 'discord.js'; } from 'discord.js';
import { Logger } from './utils/log'; import { Logger } from './utils/log';
import { config } from './utils/config'; import { config } from './utils/config';
import { CommandManager } from './commands'; import { Command, CommandCategory, CommandManager } from './commands';
import { DatabaseManager } from './modules/db'; import { DatabaseManager } from './modules/db';
type BotEventListeners = { type BotEventListeners = {
@@ -83,6 +83,14 @@ export class Bot {
await this.client.login(config.token); await this.client.login(config.token);
} }
public getCommands(): Array<Command> {
return this.cmdMgr.getAll();
}
public getCategories(): Array<CommandCategory> {
return this.cmdMgr.getCategories();
}
/* /*
event listeners event listeners
*/ */