Converter<T> constructor
- FutureOr<
T?> convert(- StringView view,
- ContextData context
- {Iterable<
CommandOptionChoiceBuilder> ? choices, - void processOptionCallback( )?,
- FutureOr<
Iterable< autocompleteCallback( )?,CommandOptionChoiceBuilder> ?> - CommandOptionType type = CommandOptionType.string,
- FutureOr<
SelectMenuOptionBuilder> toSelectMenuOption(- T
- FutureOr<
ButtonBuilder> toButton(- T
Create a new converter.
Strongly typing converter variables is recommended (i.e use Converter<String>(...)
instead
of Converter(...)
).
Implementation
const Converter(
this.convert, {
this.choices,
this.processOptionCallback,
this.autocompleteCallback,
this.type = CommandOptionType.string,
this.toSelectMenuOption,
this.toButton,
});