Slash Parameter Resolver
interface SlashParameterResolver<T : ParameterResolver<T, R>, SlashParameterResolver<T, R>, R : Any> : IParameterResolver<T> (source)
Parameter resolver for parameters of @JDASlashCommand and @AutocompleteHandler.
Needs to be implemented alongside a ParameterResolver subclass.
Parameters
T
Type of the implementation
R
Type of the returned resolved objects
Properties
Link copied to clipboard
Returns the corresponding OptionType for this slash command parameter.
Functions
Link copied to clipboard
Returns a constant list of choices for this slash parameter resolver.
Link copied to clipboard
open fun resolve(info: SlashCommandInfo, event: CommandInteractionPayload, optionMapping: OptionMapping): R?
open fun resolve(option: SlashCommandOption, event: CommandInteractionPayload, optionMapping: OptionMapping): R?
Returns a resolved object for this OptionMapping.
Link copied to clipboard
open suspend fun resolveSuspend(info: SlashCommandInfo, event: CommandInteractionPayload, optionMapping: OptionMapping): R?
open suspend fun resolveSuspend(option: SlashCommandOption, event: CommandInteractionPayload, optionMapping: OptionMapping): R?
Returns a resolved object for this OptionMapping.