Interface: PatternCommandOptions
@sapphire/plugin-pattern-commands.PatternCommandOptions
Hierarchy
Options
↳
PatternCommandOptions
Properties
aliases
• Optional
Readonly
aliases: readonly string
[]
The aliases for the piece.
Default
[]
Inherited from
MessageCommand.Options.aliases
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:671
chance
• Optional
chance: number
The chance that the pattern command is triggered.
Default
100
Defined in
projects/plugins/packages/pattern-commands/src/lib/structures/PatternCommand.ts:37
cooldownDelay
• Optional
cooldownDelay: number
The time in milliseconds for the cooldown entries to reset, if set to a non-zero value alongside cooldownLimit, the Cooldown
precondition will be added to the list.
Since
2.0.0
Default
0
Inherited from
MessageCommand.Options.cooldownDelay
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1776
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
MessageCommand.Options.cooldownFilteredUsers
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1789
cooldownLimit
• Optional
cooldownLimit: number
The amount of entries the cooldown can have before filling up, if set to a non-zero value alongside cooldownDelay, the Cooldown
precondition will be added to the list.
Since
2.0.0
Default
1
Inherited from
MessageCommand.Options.cooldownLimit
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1770
cooldownScope
• Optional
cooldownScope: BucketScope
The scope of the cooldown entries.
Since
2.0.0
Default
BucketScope.User
Inherited from
MessageCommand.Options.cooldownScope
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1782
description
• Optional
description: string
The description for the command.
Since
1.0.0
Default
''
Inherited from
MessageCommand.Options.description
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1719
detailedDescription
• Optional
detailedDescription: DetailedDescriptionCommand
The detailed description for the command.
Since
1.0.0
Default
''
Inherited from
MessageCommand.Options.detailedDescription
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1725
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
MessageCommand.Options.enabled
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:420
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
MessageCommand.Options.flags
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1590
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
MessageCommand.Options.fullCategory
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1739
generateDashLessAliases
• Optional
generateDashLessAliases: boolean
Whether to add aliases for commands with dashes in them
Since
1.0.0
Default
false
Inherited from
MessageCommand.Options.generateDashLessAliases
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1707
generateUnderscoreLessAliases
• Optional
generateUnderscoreLessAliases: boolean
Whether to add aliases for commands with underscores in them
Since
3.0.0
Default
false
Inherited from
MessageCommand.Options.generateUnderscoreLessAliases
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1713
matchFullName
• Optional
matchFullName: boolean
If true it will only trigger on full matches (for example, explore won't trigger lore) Note: It will only change the behavior of the command's name and not for the command's aliasses
Default
false
Defined in
projects/plugins/packages/pattern-commands/src/lib/structures/PatternCommand.ts:48
name
• Optional
Readonly
name: string
The name for the piece.
Default
''
Inherited from
MessageCommand.Options.name
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:415
nsfw
• Optional
nsfw: boolean
Sets whether 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
MessageCommand.Options.nsfw
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1764
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
MessageCommand.Options.options
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1597
preconditions
• Optional
preconditions: readonly PreconditionEntryResolvable
[]
The Preconditions to be run, accepts an array of their names.
Seealso
PreconditionContainerArray
Since
1.0.0
Default
[]
Inherited from
MessageCommand.Options.preconditions
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1746
prefixes
• Optional
prefixes: string
[]
The prefixes for both flags and options.
Default
['--', '-', '—']
Inherited from
MessageCommand.Options.prefixes
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1602
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)
['«', '»'] // French quotes (guillemets)
]
Inherited from
MessageCommand.Options.quotes
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1758
requiredClientPermissions
• Optional
requiredClientPermissions: PermissionResolvable
The required permissions for the client.
Since
2.0.0
Default
0
Inherited from
MessageCommand.Options.requiredClientPermissions
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1795
requiredUserPermissions
• Optional
requiredUserPermissions: PermissionResolvable
The required permissions for the user.
Since
2.0.0
Default
0
Inherited from
MessageCommand.Options.requiredUserPermissions
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1801
runIn
• Optional
runIn: null
| ChannelType
| CommandOptionsRunType
| CommandOptionsRunTypeEnum
| readonly (ChannelType
| 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. 'GUILD_TEXT'
and 'GUILD_NEWS'
becomes 'GUILD_ANY'
, and if both 'DM'
and 'GUILD_ANY'
are defined, then no precondition entry is added as it runs in all channels).
Since
2.0.0
Default
null
Inherited from
MessageCommand.Options.runIn
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1807
separators
• Optional
separators: string
[]
The flag separators.
Default
['=', ':']
Inherited from
MessageCommand.Options.separators
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1607
typing
• Optional
typing: boolean
If SapphireClient.typing is true, this option will override it. Otherwise, this option has no effect - you may call Channel#sendTyping` in the run method if you want specific commands to display the typing status.
Default
true
Inherited from
MessageCommand.Options.typing
Defined in
node_modules/@sapphire/framework/dist/index.d.ts:1813
weight
• Optional
weight: number
The matching weight of the command.
Default
5
Defined in
projects/plugins/packages/pattern-commands/src/lib/structures/PatternCommand.ts:42