Archived
restricted access to CommandManager's list
This commit is contained in:
1 parent
695f66843f
commit
00753477de
3 files changed
+17
-5
No files matched your search
+10
-1
@@ -12,7 +12,7 @@ export class CommandManager {
|
||||
* List of commands registered in the manager
|
||||
* @type {Array} {@link Command}
|
||||
*/
|
||||
public readonly list: Command[];
|
||||
private readonly list: Command[];
|
||||
/**
|
||||
* Prefix used as a way to trigger the bot using messages
|
||||
* @type {string}
|
||||
@@ -56,6 +56,15 @@ export class CommandManager {
|
||||
return command;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all commands registered in a manager
|
||||
* @returns {Command[]} List of registered commands in a manager
|
||||
*/
|
||||
getList(): Command[] {
|
||||
const list = this.list;
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given {@link Command} to the instance manager with initial processing
|
||||
* @param {Command} command - {@link Command} instance object
|
||||
|
||||
Reference in new issue
Block a user