CombineConverter<R, T> class

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 Member.

You might also be interested in:

Implemented types

Constructors

CombineConverter(Converter<R> converter, FutureOr<T?> process(R, ContextData), {Iterable<CommandOptionChoiceBuilder>? choices, CommandOptionType? type, void processOptionCallback(CommandOptionBuilder)?, FutureOr<Iterable<CommandOptionChoiceBuilder>?> autocompleteCallback(AutocompleteContext)?, FutureOr<SelectMenuOptionBuilder> toSelectMenuOption(T)?, FutureOr<ButtonBuilder> toButton(T)?})
Create a new CombineConverter.
const

Properties

autocompleteCallback → (FutureOr<Iterable<CommandOptionChoiceBuilder>?> Function(AutocompleteContext)?)
A function called to provide autocompletion for arguments of this type.
no setteroverride
choices Iterable<CommandOptionChoiceBuilder>?
The choices for this type.
no setteroverride
convert FutureOr<T?> Function(StringView view, ContextData context)
The function called to perform the conversion.
no setteroverride
converter Converter<R>
The converter used to parse the original input to the intermediate type.
final
hashCode int
The hash code for this object.
no setterinherited
output RuntimeType<T>
The type that this converter parses.
no setteroverride
process FutureOr<T?> Function(R, ContextData)
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.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toButton → (FutureOr<ButtonBuilder> Function(T)?)
A function called to provide ButtonBuilders that can be used to represent an element converted by this converter.
final
toSelectMenuOption → (FutureOr<SelectMenuOptionBuilder> Function(T)?)
A function called to provide SelectMenuOptionBuilders that can be used to represent an element converted by this converter.
final
type CommandOptionType
The Discord Slash Command Argument Type of the type that this converter parses.
no setteroverride

Methods

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

Operators

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