Skip to main content

Interface: SubCommandPluginCommandOptions<ArgType, CommandType>

@sapphire/plugin-subcommands.SubCommandPluginCommandOptions

Type parameters

NameType
ArgTypeextends Args = Args
CommandTypeextends Command<ArgType> = Command<ArgType>

Hierarchy

  • Options

    โ†ณ SubCommandPluginCommandOptions

Properties

aliases

โ€ข Optional Readonly aliases: readonly string[]

The aliases for the piece.

default []

Inherited from

Command.Options.aliases

Defined in

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


cooldownDelay

โ€ข Optional cooldownDelay: number

The time in milliseconds for the cooldown entries to reset, if set to a non-zero value alongside {@link Command.Options.cooldownLimit}, the Cooldown precondition will be added to the list.

since 2.0.0

default 0

Inherited from

Command.Options.cooldownDelay

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:704


cooldownFilteredUsers

โ€ข Optional cooldownFilteredUsers: string[]

The users that are exempt from the Cooldown precondition. Use this to filter out someone like a bot owner

since 2.0.0

default undefined

Inherited from

Command.Options.cooldownFilteredUsers

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:717


cooldownLimit

โ€ข Optional cooldownLimit: number

The amount of entries the cooldown can have before filling up, if set to a non-zero value alongside {@link Command.Options.cooldownDelay}, the Cooldown precondition will be added to the list.

since 2.0.0

default 1

Inherited from

Command.Options.cooldownLimit

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:698


cooldownScope

โ€ข Optional cooldownScope: BucketScope

The scope of the cooldown entries.

since 2.0.0

default BucketScope.User

Inherited from

Command.Options.cooldownScope

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:710


description

โ€ข Optional description: string

The description for the command.

since 1.0.0

default ''

Inherited from

Command.Options.description

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:648


detailedDescription

โ€ข Optional detailedDescription: string

The detailed description for the command.

since 1.0.0

default ''

Inherited from

Command.Options.detailedDescription

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:654


enabled

โ€ข Optional Readonly enabled: boolean

Whether or not the piece should be enabled. If set to false, the piece will be unloaded.

default true

Inherited from

Command.Options.enabled

Defined in

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


flags

โ€ข Optional flags: boolean | readonly string[]

The accepted flags. Flags are key-only identifiers that can be placed anywhere in the command. Two different types are accepted:

  • An array of strings, e.g. [silent].
  • A boolean defining whether the strategy should accept all keys (true) or none at all (false).

default []

Inherited from

Command.Options.flags

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:575


fullCategory

โ€ข Optional fullCategory: string[]

The full category path for the command

since 2.0.0

default 'An array of folder names that lead back to the folder that is registered for in the commands store'

example

// Given a file named `ping.js` at the path of `commands/General/ping.js`
['General']

// Given a file named `info.js` at the path of `commands/General/About/ping.js`
['General', 'About']

Inherited from

Command.Options.fullCategory

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:668


generateDashLessAliases

โ€ข Optional generateDashLessAliases: boolean

Whether to add aliases for commands with dashes in them

since 1.0.0

default false

Inherited from

Command.Options.generateDashLessAliases

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:642


name

โ€ข Optional Readonly name: string

The name for the piece.

default ''

Inherited from

Command.Options.name

Defined in

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


nsfw

โ€ข Optional nsfw: boolean

Sets whether or not the command should be treated as NSFW. If set to true, the NSFW precondition will be added to the list.

since 2.0.0

default false

Inherited from

Command.Options.nsfw

Defined in

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


options

โ€ข Optional options: boolean | readonly string[]

The accepted options. Options are key-value identifiers that can be placed anywhere in the command. Two different types are accepted:

  • An array of strings, e.g. [silent].
  • A boolean defining whether the strategy should accept all keys (true) or none at all (false).

default []

Inherited from

Command.Options.options

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:582


preconditions

โ€ข Optional preconditions: readonly PreconditionEntryResolvable[]

The {@link Precondition}s to be run, accepts an array of their names.

seealso {@link PreconditionContainerArray}

since 1.0.0

default []

Inherited from

Command.Options.preconditions

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:675


prefixes

โ€ข Optional prefixes: string[]

The prefixes for both flags and options.

default ['--', '-', 'โ€”']

Inherited from

Command.Options.prefixes

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:587


quotes

โ€ข Optional quotes: [string, string][]

The quotes accepted by this command, pass [] to disable them.

since 1.0.0

default [ ['"', '"'], // Double quotes ['โ€œ', 'โ€'], // Fancy quotes (on iOS) ['ใ€Œ', 'ใ€'] // Corner brackets (CJK) ]

Inherited from

Command.Options.quotes

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:686


requiredClientPermissions

โ€ข Optional requiredClientPermissions: PermissionResolvable

The required permissions for the client.

since 2.0.0

default 0

Inherited from

Command.Options.requiredClientPermissions

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:723


requiredUserPermissions

โ€ข Optional requiredUserPermissions: PermissionResolvable

The required permissions for the user.

since 2.0.0

default 0

Inherited from

Command.Options.requiredUserPermissions

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:729


runIn

โ€ข Optional runIn: null | CommandOptionsRunType | CommandOptionsRunTypeEnum | readonly (CommandOptionsRunType | CommandOptionsRunTypeEnum)[]

The channels the command should run in. If set to null, no precondition entry will be added. Some optimizations are applied when given an array to reduce the amount of preconditions run (e.g. 'text' and 'news' becomes 'guild', and if both 'dm' and 'guild' are defined, then no precondition entry is added as it runs in all channels).

since 2.0.0

default null

Inherited from

Command.Options.runIn

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:735


separators

โ€ข Optional separators: string[]

The flag separators.

default ['=', ':']

Inherited from

Command.Options.separators

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:592


subCommands

โ€ข Optional subCommands: RawEntries<ArgType, CommandType>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandPluginCommand.ts:22


typing

โ€ข Optional typing: boolean

If {@link SapphireClient.typing} is true, this option will override it. Otherwise, this option has no effect - you may call {@link Channel#sendTyping}` in the run method if you want specific commands to display the typing status.

default true

Inherited from

Command.Options.typing

Defined in

node_modules/@sapphire/framework/dist/index.d.ts:741