feat: add getCommands and getCategories
This commit is contained in:
+9
-1
@@ -10,7 +10,7 @@ import {
|
||||
} from 'discord.js';
|
||||
import { Logger } from './utils/log';
|
||||
import { config } from './utils/config';
|
||||
import { CommandManager } from './commands';
|
||||
import { Command, CommandCategory, CommandManager } from './commands';
|
||||
import { DatabaseManager } from './modules/db';
|
||||
|
||||
type BotEventListeners = {
|
||||
@@ -83,6 +83,14 @@ export class Bot {
|
||||
await this.client.login(config.token);
|
||||
}
|
||||
|
||||
public getCommands(): Array<Command> {
|
||||
return this.cmdMgr.getAll();
|
||||
}
|
||||
|
||||
public getCategories(): Array<CommandCategory> {
|
||||
return this.cmdMgr.getCategories();
|
||||
}
|
||||
|
||||
/*
|
||||
event listeners
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user