QuotableTextParameterResolver

Parameter resolver for parameters of @JDATextCommandVariation.

This resolver is an extension of TextParameterResolver, but the regex pattern is quoted to help command parsing.

Needs to be implemented alongside a ParameterResolver subclass.

Parameters

T

Type of the implementation

R

Type of the returned resolved objects

Properties

Link copied to clipboard
abstract val pattern: Pattern

Returns the pattern required to recognize this parameter, used in a larger pattern representing the entire command.

Link copied to clipboard
open override val preferredPattern: Pattern
Link copied to clipboard
abstract val quotedPattern: Pattern

A quoted pattern of the parameter resolver.

Link copied to clipboard

The minimum group count to be extracted from the match result.

Link copied to clipboard
abstract val testExample: String

Returns an example string for this parameter

Functions

Link copied to clipboard

Returns a help example for the supplied option.

Link copied to clipboard
open fun resolve(variation: TextCommandVariation, event: MessageReceivedEvent, args: Array<String?>): R?

Returns a resolved object from this text command.

Link copied to clipboard
open suspend fun resolveSuspend(variation: TextCommandVariation, event: MessageReceivedEvent, args: Array<String?>): R?

Returns a resolved object from this text command.