Autocomplete Arg
open class AutocompleteArg<Input, Output>( val name: String, val description: String, val type: PrimitiveArgument<Input, Output>, autocomplete: suspend AutocompleteData.() -> List<Input>) : WrappedArgument<Input, Output, Input, Output>
Content copied to clipboard
Provides autocomplete options to slash input.
Constructors
Link copied to clipboard
fun <Input, Output> AutocompleteArg( name: String, description: String, type: PrimitiveArgument<Input, Output>, autocomplete: suspend AutocompleteData.() -> List<Input>)
Content copied to clipboard
Functions
Link copied to clipboard
open suspend override fun generateExamples(context: DiscordContext): List<String>
Content copied to clipboard
A function called whenever an example of this type is needed.
Link copied to clipboard
Utility function to check that this Argument is an OptionalArg.
Link copied to clipboard
Accept multiple inputs of this Argument.
Link copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails.
open fun optional(default: suspend (DiscordContext) -> Output): OptionalArg<Input, Output, Output>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails. Exposes a CommandEvent.
Link copied to clipboard
open fun optionalNullable(default: Output? = null): OptionalArg<Input, Output, Output?>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails.
open fun optionalNullable(default: suspend (DiscordContext) -> Output?): OptionalArg<Input, Output, Output?>
Content copied to clipboard
Make this argument optional and fall back to the default value if the conversion fails. Exposes a CommandEvent.