SlashParameterResolver
interface SlashParameterResolver<T : ParameterResolver<T, R>, SlashParameterResolver<T, R>, R : Any> : IParameterResolver<T> (source)
Resolver for slash command options, including referenced autocomplete parameters.
Needs to be implemented alongside a ParameterResolver subclass.
Types supported by default
IMentionable (only when mentioned)
List of mentionable (see @MentionsString)
GuildChannel subtypes, the channel types are set automatically depending on the type, but a broader channel type can be used and restricted to multiple concrete types by using @ChannelTypes
Guild (input as a string)
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(option: SlashCommandOption, event: CommandInteractionPayload, optionMapping: OptionMapping): R?
Returns a resolved object for this OptionMapping.
Link copied to clipboard
open suspend fun resolveSuspend(option: SlashCommandOption, event: CommandInteractionPayload, optionMapping: OptionMapping): R?
Returns a resolved object for this OptionMapping.