Skip to main content

Class: CommandStore

Defined in: projects/framework/src/lib/structures/CommandStore.ts:18

Stores all Command pieces

Since

1.0.0

Extends

Constructors

new CommandStore()

new CommandStore(): CommandStore

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

Returns

CommandStore

Overrides

AliasStore<Command, 'commands'>.constructor

Accessors

categories

Get Signature

get categories(): string[]

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

Get all the command categories.

Returns

string[]

Methods

loadAll()

loadAll(): Promise<void>

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

Loads all pieces from all directories specified by paths.

Returns

Promise<void>

Overrides

AliasStore.loadAll


unload()

unload(name: string | Command): Promise<Command>

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

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

Parameters

ParameterTypeDescription
namestring | CommandThe name of the file to load.

Returns

Promise<Command>

Returns the piece that was unloaded.

Overrides

AliasStore.unload