Skip to content

Commit fdc4aa4

Browse files
authored
refactor: flatten command strategy options (#220)
BREAKING CHANGE: Flattened `CommandOptions.strategyOptions` into `CommandOptions`
1 parent a1dd0cf commit fdc4aa4

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/lib/structures/Command.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export abstract class Command<T = Args> extends AliasPiece {
4848
super(context, { ...options, name: (name ?? context.name).toLowerCase() });
4949
this.description = options.description ?? '';
5050
this.detailedDescription = options.detailedDescription ?? '';
51-
this.strategy = new FlagUnorderedStrategy(options.strategyOptions);
51+
this.strategy = new FlagUnorderedStrategy(options);
5252
this.lexer.setQuotes(
5353
options.quotes ?? [
5454
['"', '"'], // Double quotes
@@ -177,7 +177,7 @@ export const enum CommandPreConditions {
177177
* The {@link Command} options.
178178
* @since 1.0.0
179179
*/
180-
export interface CommandOptions extends AliasPieceOptions {
180+
export interface CommandOptions extends AliasPieceOptions, FlagStrategyOptions {
181181
/**
182182
* Whether to add aliases for commands with dashes in them
183183
* @since 1.0.0
@@ -207,13 +207,6 @@ export interface CommandOptions extends AliasPieceOptions {
207207
*/
208208
preconditions?: readonly PreconditionEntryResolvable[];
209209

210-
/**
211-
* The options for the lexer strategy.
212-
* @since 1.0.0
213-
* @default {}
214-
*/
215-
strategyOptions?: FlagStrategyOptions;
216-
217210
/**
218211
* The quotes accepted by this command, pass `[]` to disable them.
219212
* @since 1.0.0

0 commit comments

Comments
 (0)