feat: add getCommands and getCategories
This commit is contained in:
+9
-1
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user