Class: Command<PreParseReturn, O>
Type parameters
Name | Type |
---|---|
PreParseReturn | Args |
O | extends Options = Options |
Hierarchy
AliasPiece
<O
>↳
Command
Constructors
constructor
• new Command<PreParseReturn
, O
>(context
, options?
)
Type parameters
Name | Type |
---|---|
PreParseReturn | Args |
O | extends CommandOptions <O > = CommandOptions |
Parameters
Name | Type | Description |
---|---|---|
context | PieceContext | |
options | O |
Overrides
Defined in
projects/framework/src/lib/structures/Command.ts:88
Properties
aliases
• aliases: readonly string
[]
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:687
applicationCommandRegistry
• Readonly
applicationCommandRegistry: ApplicationCommandRegistry
Defined in
projects/framework/src/lib/structures/Command.ts:74
description
• description: string
Defined in
projects/framework/src/lib/structures/Command.ts:33
detailedDescription
• detailedDescription: DetailedDescriptionCommand
Defined in
projects/framework/src/lib/structures/Command.ts:45
enabled
• enabled: boolean
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:450
fullCategory
• Readonly
fullCategory: readonly string
[]
Defined in
projects/framework/src/lib/structures/Command.ts:55
lexer
• Private
lexer: Lexer
Defined in
projects/framework/src/lib/structures/Command.ts:81
location
• Readonly
location: PieceLocation
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:442
name
• Readonly
name: string
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:446
options
• Readonly
options: O
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:454
preconditions
• preconditions: PreconditionContainerArray
Defined in
projects/framework/src/lib/structures/Command.ts:39
store
• store: CommandStore
Overrides
Defined in
projects/framework/src/lib/structures/Command.ts:27
strategy
• strategy: IUnorderedStrategy
Defined in
projects/framework/src/lib/structures/Command.ts:61
typing
• typing: boolean
Defined in
projects/framework/src/lib/structures/Command.ts:68
Accessors
category
• get
category(): null
| string
Returns
null
| string
Defined in
projects/framework/src/lib/structures/Command.ts:145
container
• get
container(): Container
Returns
Container
Inherited from
AliasPiece.container
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:460
parentCategory
• get
parentCategory(): null
| string
Returns
null
| string
Defined in
projects/framework/src/lib/structures/Command.ts:169
subCategory
• get
subCategory(): null
| string
Returns
null
| string
Defined in
projects/framework/src/lib/structures/Command.ts:157
Methods
autocompleteRun
▸ Optional
autocompleteRun(interaction
): unknown
Parameters
Name | Type | Description |
---|---|---|
interaction | AutocompleteInteraction <CacheType > |
Returns
unknown
Defined in
projects/framework/src/lib/structures/Command.ts:207
chatInputRun
▸ Optional
chatInputRun(interaction
, context
): unknown
Parameters
Name | Type | Description |
---|---|---|
interaction | ChatInputCommandInteraction <CacheType > | |
context | ChatInputCommandContext |
Returns
unknown
Defined in
projects/framework/src/lib/structures/Command.ts:186
contextMenuRun
▸ Optional
contextMenuRun(interaction
, context
): unknown
Parameters
Name | Type | Description |
---|---|---|
interaction | ContextMenuCommandInteraction <CacheType > | |
context | ContextMenuCommandContext |
Returns
unknown
Defined in
projects/framework/src/lib/structures/Command.ts:193
messagePreParse
▸ messagePreParse(message
, parameters
, context
): Awaitable
<PreParseReturn
>
Parameters
Name | Type | Description |
---|---|---|
message | Message <boolean > | |
parameters | string | |
context | MessageCommandContext |
Returns
Awaitable
<PreParseReturn
>
Defined in
projects/framework/src/lib/structures/Command.ts:131
messageRun
▸ Optional
messageRun(message
, args
, context
): unknown
Parameters
Name | Type | Description |
---|---|---|
message | Message <boolean > | |
args | PreParseReturn | |
context | MessageCommandContext |
Returns
unknown
Defined in
projects/framework/src/lib/structures/Command.ts:179
onLoad
▸ onLoad(): unknown
Returns
unknown
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:465
onUnload
▸ onUnload(): unknown
Returns
unknown
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:470
parseConstructorPreConditions
▸ Protected
parseConstructorPreConditions(options
): void
Parameters
Name | Type | Description |
---|---|---|
options | CommandOptions |
Returns
void
Defined in
projects/framework/src/lib/structures/Command.ts:338
parseConstructorPreConditionsCooldown
▸ Protected
parseConstructorPreConditionsCooldown(options
): void
Parameters
Name | Type | Description |
---|---|---|
options | CommandOptions |
Returns
void
Defined in
projects/framework/src/lib/structures/Command.ts:394
parseConstructorPreConditionsNsfw
▸ Protected
parseConstructorPreConditionsNsfw(options
): void
Parameters
Name | Type | Description |
---|---|---|
options | CommandOptions |
Returns
void
Defined in
projects/framework/src/lib/structures/Command.ts:350
parseConstructorPreConditionsRequiredClientPermissions
▸ Protected
parseConstructorPreConditionsRequiredClientPermissions(options
): void
Parameters
Name | Type | Description |
---|---|---|
options | CommandOptions |
Returns
void
Defined in
projects/framework/src/lib/structures/Command.ts:370
parseConstructorPreConditionsRequiredUserPermissions
▸ Protected
parseConstructorPreConditionsRequiredUserPermissions(options
): void
Parameters
Name | Type | Description |
---|---|---|
options | CommandOptions |
Returns
void
Defined in
projects/framework/src/lib/structures/Command.ts:382
parseConstructorPreConditionsRunIn
▸ Protected
parseConstructorPreConditionsRunIn(options
): void
Parameters
Name | Type | Description |
---|---|---|
options | CommandOptions |
Returns
void
Defined in
projects/framework/src/lib/structures/Command.ts:360
registerApplicationCommands
▸ Optional
registerApplicationCommands(registry
): Awaitable
<void
>
Parameters
Name | Type | Description |
---|---|---|
registry | ApplicationCommandRegistry |
Returns
Awaitable
<void
>
Defined in
projects/framework/src/lib/structures/Command.ts:225
reload
▸ reload(): Promise
<void
>
Returns
Promise
<void
>
Overrides
Defined in
projects/framework/src/lib/structures/Command.ts:255
resolveConstructorPreConditionsRunType
▸ Private
resolveConstructorPreConditionsRunType(runIn
): null
| PreconditionContainerArray
| CommandPreConditions
Parameters
Name | Type |
---|---|
runIn | undefined | null | CommandOptionsRunType | CommandOptionsRunTypeEnum | readonly (CommandOptionsRunType | CommandOptionsRunTypeEnum )[] |
Returns
null
| PreconditionContainerArray
| CommandPreConditions
Defined in
projects/framework/src/lib/structures/Command.ts:414
supportsAutocompleteInteractions
▸ supportsAutocompleteInteractions(): this is AutocompleteCommand
Returns
this is AutocompleteCommand
Defined in
projects/framework/src/lib/structures/Command.ts:251
supportsChatInputCommands
▸ supportsChatInputCommands(): this is ChatInputCommand
Returns
this is ChatInputCommand
Defined in
projects/framework/src/lib/structures/Command.ts:237
supportsContextMenuCommands
▸ supportsContextMenuCommands(): this is ContextMenuCommand
Returns
this is ContextMenuCommand
Defined in
projects/framework/src/lib/structures/Command.ts:244
supportsMessageCommands
▸ supportsMessageCommands(): this is MessageCommand
Returns
this is MessageCommand
Defined in
projects/framework/src/lib/structures/Command.ts:230
toJSON
▸ toJSON(): CommandJSON
Returns
Overrides
Defined in
projects/framework/src/lib/structures/Command.ts:212
unload
▸ unload(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:474