withTextSupport

@CheckReturnValue
fun withTextSupport(values: Collection<E>, nameFunction: EnumNameFunction<E>, ignoreCase: Boolean = true): EnumResolverBuilder<E>(source)

Enables resolution of text command parameters.

Note: Unlike application commands and due to text commands being registered once for everyone, the values cannot be customized per-guild.

Parameters

values

The values the text option resolver will support

nameFunction

The function returning the display name of the given enum value, this is what the user will need to type

ignoreCase

Whether arguments will be matched while ignoring the casing, true by default

Throws