Skip to main content

Class: Argument<T, O>

Type parameters

NameType
Tunknown
Oextends Options = Options

Hierarchy

Implements

Constructors

constructor

new Argument<T, O>(context, options?)

Type parameters

NameType
Tunknown
Oextends ArgumentOptions<O> = ArgumentOptions

Parameters

NameType
contextPieceContext
options?AliasPieceOptions

Inherited from

AliasPiece.constructor

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:688

Properties

aliases

aliases: readonly string[]

Inherited from

AliasPiece.aliases

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:687


enabled

enabled: boolean

Inherited from

AliasPiece.enabled

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:450


location

Readonly location: PieceLocation

Inherited from

AliasPiece.location

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:442


name

Readonly name: string

Implementation of

IArgument.name

Inherited from

AliasPiece.name

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:446


options

Readonly options: O

Inherited from

AliasPiece.options

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:454


store

Readonly store: Store<Piece<PieceOptions>>

Inherited from

AliasPiece.store

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:438

Accessors

container

get container(): Container

Returns

Container

Inherited from

AliasPiece.container

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:460

Methods

error

error(options): Result<T>

Parameters

NameTypeDescription
optionsOmit<Options<T>, "argument">

Returns

Result<T>

Defined in

projects/framework/src/lib/structures/Argument.ts:109


ok

ok(value): Result<T>

Parameters

NameTypeDescription
valueT

Returns

Result<T>

Defined in

projects/framework/src/lib/structures/Argument.ts:101


onLoad

onLoad(): unknown

Returns

unknown

Inherited from

AliasPiece.onLoad

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:465


onUnload

onUnload(): unknown

Returns

unknown

Inherited from

AliasPiece.onUnload

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:470


reload

reload(): Promise<void>

Returns

Promise<void>

Inherited from

AliasPiece.reload

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:478


run

Abstract run(parameter, context): AwaitableResult<T>

Parameters

NameType
parameterstring
contextContext<T>

Returns

AwaitableResult<T>

Implementation of

IArgument.run

Defined in

projects/framework/src/lib/structures/Argument.ts:95


toJSON

toJSON(): AliasPieceJSON

Returns

AliasPieceJSON

Inherited from

AliasPiece.toJSON

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:692


unload

unload(): Promise<void>

Returns

Promise<void>

Inherited from

AliasPiece.unload

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:474