MessageConverter
Argument converter for discord Message arguments.
This converter supports specifying messages by supplying:
A Discord message jump link
A message ID (it will be assumed that the message is in the current channel).
Parameters
Whether to require messages to be in a specified guild.
Lambda returning a specific guild to require the member to be in. If omitted, defaults to the guild the command was invoked in.
Whether to use the replied-to message (if there is one) instead of trying to parse an argument.
Properties
Argument object containing this converter and its metadata.
Current instance of the bot.
Access to the converter builder, perhaps a bit more hacky than it should be but whatever.
If the signatureType isn't sufficient, you can optionally provide a translation key pointing to a longer type string to use for error messages.
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.
Functions
Return a Key representing a pre-translated error string.
Return a translated, formatted error string.
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.
Use the given option taken straight from the slash command invocation to fill the converter.
Wrap this single converter with a SingleToDefaultingConverter, which is a special converter that will act like a DefaultingConverter using the same logic of this converter.
Wrap this single converter with a SingleToListConverter, which is a special converter that will act like a ListConverter using the same logic of this converter.
Wrap this single converter with a SingleToOptionalConverter, which is a special converter that will act like an OptionalConverter using the same logic of this converter.
Call the validator lambda, if one was provided.