Type Alias ArgumentPromptOptions

ArgumentPromptOptions: {
    breakout?: boolean;
    cancel?: ArgumentPromptResponse;
    cancelWord?: string;
    ended?: ArgumentPromptResponse;
    infinite?: boolean;
    limit?: number;
    modifyCancel?: PromptContentModifier;
    modifyEnded?: PromptContentModifier;
    modifyRetry?: PromptContentModifier;
    modifyStart?: PromptContentModifier;
    modifyTimeout?: PromptContentModifier;
    optional?: boolean;
    retries?: number;
    retry?: ArgumentPromptResponse;
    start?: ArgumentPromptResponse;
    stopWord?: string;
    time?: number;
    timeout?: ArgumentPromptResponse;
}

A prompt to run if the user did not input the argument correctly. Can only be used if there is not a default value (unless optional is true).

Type declaration

  • Optionalbreakout?: boolean

    Whenever an input matches the format of a command, this option controls whether or not to cancel this command and run that command. The command to be run may be the same command or some other command.

    true
    
  • Optionalcancel?: ArgumentPromptResponse

    Text sent on cancellation of command.

  • OptionalcancelWord?: string

    Word to use for cancelling the command.

    "cancel"
    
  • Optionalended?: ArgumentPromptResponse

    Text sent on amount of tries reaching the max.

  • Optionalinfinite?: boolean

    Prompts forever until the stop word, cancel word, time limit, or retry limit. Note that the retry count resets back to one on each valid entry. The final evaluated argument will be an array of the inputs.

    false
    
  • Optionallimit?: number

    Amount of inputs allowed for an infinite prompt before finishing.

    Infinity.
    
  • OptionalmodifyCancel?: PromptContentModifier

    Function to modify cancel messages.

  • OptionalmodifyEnded?: PromptContentModifier

    Function to modify out of tries messages.

  • OptionalmodifyRetry?: PromptContentModifier

    Function to modify retry prompts.

  • OptionalmodifyStart?: PromptContentModifier

    Function to modify start prompts.

  • OptionalmodifyTimeout?: PromptContentModifier

    Function to modify timeout messages.

  • Optionaloptional?: boolean

    Prompts only when argument is provided but was not of the right type.

    false
    
  • Optionalretries?: number

    Amount of retries allowed.

    1
    
  • Optionalretry?: ArgumentPromptResponse

    Text sent on a retry (failure to cast type).

  • Optionalstart?: ArgumentPromptResponse

    Text sent on start of prompt.

  • OptionalstopWord?: string

    Word to use for ending infinite prompts.

    "stop"
    
  • Optionaltime?: number

    Time to wait for input.

    30000
    
  • Optionaltimeout?: ArgumentPromptResponse

    Text sent on collector time out.