CombineConverter<R, T> class Null safety

A converter that extends the functionality of an existing converter, piping its output through another function.

This has the effect of allowing further processing of the output of a converter, for example to transform a Snowflake into a IMember.

You might also be interested in:

Implemented types

Constructors

CombineConverter(Converter<R> converter, FutureOr<T?> process(R, IChatContext), {Iterable<ArgChoiceBuilder>? choices, CommandOptionType? type, void processOptionCallback(CommandOptionBuilder)?, FutureOr<Iterable<ArgChoiceBuilder>?> autocompleteCallback(AutocompleteContext)?})
Create a new CombineConverter.
const

Properties

autocompleteCallback → (FutureOr<Iterable<ArgChoiceBuilder>?> Function?(AutocompleteContext)?)
A function called to provide autocompletion for arguments of this type.
read-only, override
choices Iterable<ArgChoiceBuilder>?
The choices for this type.
read-only, override
convert FutureOr<T?> Function(StringView view, IChatContext context)
The function called to perform the conversion.
read-only, override
converter Converter<R>
The converter used to parse the original input to the intermidate type.
final
hashCode int
The hash code for this object.
read-only, inherited
output Type
The type that this converter parses.
final
process FutureOr<T?> Function(R, IChatContext)
The function that transforms the intermediate type into the output type.
final
processOptionCallback → (void Function?(CommandOptionBuilder)?)
A callback called with the CommandOptionBuilder created for an option using this converter.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type CommandOptionType
The Discord Slash Command Argument Type of the type that this converter parses.
read-only, override

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited