ArgumentOptions: {
    default?: DefaultValueSupplier | any;
    description?: string | any | any[];
    flag?: string | string[] | null;
    id?: string | null;
    index?: number | null;
    limit?: number;
    match?: ArgumentMatchString;
    modifyOtherwise?: OtherwiseContentModifier | null;
    multipleFlags?: boolean;
    otherwise?: MessageSendResolvable | OtherwiseContentSupplier | null;
    prompt?: ArgumentPromptOptions | boolean | null;
    type?: ArgumentType | ArgumentTypeCaster;
    unordered?: boolean | number | number[];
}

Options for how an argument parses text.

Type declaration

  • Optionaldefault?: DefaultValueSupplier | any

    Default value if no input or did not cast correctly. If using a flag match, setting the default value to a non-void value inverses the result.

  • Optionaldescription?: string | any | any[]

    The description of the argument

  • Optionalflag?: string | string[] | null

    The string(s) to use as the flag for flag or option match.

    null
    
  • Optionalid?: string | null

    ID of the argument for use in the args object. This does nothing inside an ArgumentGenerator.

  • Optionalindex?: number | null

    Index of phrase to start from. Applicable to phrase, text, content, rest, or separate match only. Ignored when used with the unordered option.

    null
    
  • Optionallimit?: number

    Amount of phrases to match when matching more than one. Applicable to text, content, rest, or separate match only.

    Infinity.
    
  • Optionalmatch?: ArgumentMatchString

    Method to match text. Defaults to 'phrase'.

    ArgumentMatch.PHRASE
    
  • OptionalmodifyOtherwise?: OtherwiseContentModifier | null

    Function to modify otherwise content.

  • OptionalmultipleFlags?: boolean

    Whether or not to have flags process multiple inputs. For option flags, this works like the separate match; the limit option will also work here. For flags, this will count the number of occurrences.

    false
    
  • Optionalotherwise?: MessageSendResolvable | OtherwiseContentSupplier | null

    Text sent if argument parsing fails. This overrides the default option and all prompt options.

  • Optionalprompt?: ArgumentPromptOptions | boolean | null

    Prompt options for when user does not provide input.

  • Optionaltype?: ArgumentType | ArgumentTypeCaster

    Type to cast to.

    ArgumentType.STRING
    
  • Optionalunordered?: boolean | number | number[]

    Marks the argument as unordered. Each phrase is evaluated in order until one matches (no input at all means no evaluation). Passing in a number forces evaluation from that index onwards. Passing in an array of numbers forces evaluation on those indices only. If there is a match, that index is considered used and future unordered args will not check that index again. If there is no match, then the prompting or default value is used. Applicable to phrase match only.

    false