Skip to main content

Class: CommandStore

Stores all Command pieces

Since

1.0.0

Extends

Constructors

new CommandStore()

new CommandStore(): CommandStore

Returns

CommandStore

Overrides

AliasStore<Command, 'commands'>.constructor

Defined in

projects/framework/src/lib/structures/CommandStore.ts:19

Accessors

categories

Get Signature

get categories(): string[]

Get all the command categories.

Returns

string[]

Defined in

projects/framework/src/lib/structures/CommandStore.ts:26

Methods

loadAll()

loadAll(): Promise<void>

Loads all pieces from all directories specified by paths.

Returns

Promise<void>

Overrides

AliasStore.loadAll

Defined in

projects/framework/src/lib/structures/CommandStore.ts:56


unload()

unload(name: string | Command<Args, CommandOptions>): Promise<Command<Args, CommandOptions>>

Unloads a piece given its instance or its name, and removes all the aliases.

Parameters

ParameterTypeDescription
namestring | Command<Args, CommandOptions>The name of the file to load.

Returns

Promise<Command<Args, CommandOptions>>

Returns the piece that was unloaded.

Overrides

AliasStore.unload

Defined in

projects/framework/src/lib/structures/CommandStore.ts:32