GuildChannelConverter<T extends IGuildChannel> class Null safety

A converter that converts input to one or more types of IGuildChannels.

This converter will only allow users to select channels of one of the types in channelTypes, and then will further only accept channels of type T.

Note: this converter does not ensure that all values will conform to channelTypes. channelTypes offers purely client-side validation and input from text commands will not be validated beyond being assignable to T.

You might also be interested in:

Implemented types


GuildChannelConverter(List<ChannelType>? channelTypes)
Create a new GuildChannelConverter.


autocompleteCallback → (FutureOr<Iterable<ArgChoiceBuilder>?> Function?(AutocompleteContext)?)
A function called to provide autocompletion for arguments of this type.
read-only, override
channelTypes List<ChannelType>?
The types of channels this converter allows users to select.
choices Iterable<ArgChoiceBuilder>
The choices for this type.
read-only, override
convert FutureOr<T?> Function(StringView, IChatContext)
The function called to perform the conversion.
read-only, override
hashCode int
The hash code for this object.
read-only, inherited
output Type
The type that this converter parses.
read-only, override
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


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


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