Converter
Base class for an argument converter.
Argument converters are in charge of taking either one or several string arguments, and converting them into some other type. They're a convenience for people working with the commands framework.
You probably don't want to subclass this directly. There are three direct subclasses you can look at if you'd like to implement your own converters.
Parameters
Whether this converter must succeed for a command invocation to be valid.
TypeVar representing the specific result type this converter represents
TypeVar representing the final type of the parsed argument which is given to the bot developer
TypeVar representing how this converter receives named arguments - either String or List<String>
TypeVar representing how this converter signals whether it succeeded - either Boolean or Int
Inheritors
Properties
Argument object containing this converter and its metadata.
Current instance of the bot.
If the signatureType isn't sufficient, you can optionally provide a translation key pointing to a longer type string to use for error messages.
The parsed value.
This will be set to true by the argument parser if the conversion succeeded.
For commands with generated signatures, set whether the type string should be shown in the signature.
Translation key pointing to a short string describing the type of data this converter handles. Should be very short.
Validation lambda, which may throw a DiscordRelayedException if required.
Functions
Return a Key representing a pre-translated error string.
Return a translated, formatted error string.
For delegation, retrieve the parsed value if it's been set, or null if it hasn't.
Given a Throwable encountered during the parse function, return a human-readable string to display on Discord.
Call the mutator lambda, if one was provided.
Process the string in the given parser, converting it into a new value.
Call the validator lambda, if one was provided.