Package dev.rollczi.litecommands.jda
Class JDACommandTranslator
java.lang.Object
dev.rollczi.litecommands.jda.JDACommandTranslator
-
Constructor Summary
ConstructorsConstructorDescriptionJDACommandTranslator(dev.rollczi.litecommands.argument.parser.ParserRegistry<net.dv8tion.jda.api.entities.User> parserRegistry) -
Method Summary
Modifier and TypeMethodDescriptiontype(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDAContextTypeMapper<T> mapper) type(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDATypeMapper<T> mapper) typeOverlay(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDAContextTypeMapper<String> mapper) typeOverlay(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDATypeMapper<String> mapper) typeWrapper(Class<T> type, Function<dev.rollczi.litecommands.reflect.type.TypeToken<T>, dev.rollczi.litecommands.reflect.type.TypeToken<?>> unwrapper, Function<?, T> wrapper) Wrappers are only used for wrapping types that are supported by Discord API, and we want to skip LiteCommands parsing.
-
Constructor Details
-
JDACommandTranslator
public JDACommandTranslator(dev.rollczi.litecommands.argument.parser.ParserRegistry<net.dv8tion.jda.api.entities.User> parserRegistry)
-
-
Method Details
-
type
public <T> JDACommandTranslator type(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDATypeMapper<T> mapper) -
type
public <T> JDACommandTranslator type(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDAContextTypeMapper<T> mapper) -
typeOverlay
public <T> JDACommandTranslator typeOverlay(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDATypeMapper<String> mapper) -
typeOverlay
public <T> JDACommandTranslator typeOverlay(Class<T> type, net.dv8tion.jda.api.interactions.commands.OptionType optionType, JDAContextTypeMapper<String> mapper) -
typeWrapper
public <T> JDACommandTranslator typeWrapper(Class<T> type, Function<dev.rollczi.litecommands.reflect.type.TypeToken<T>, dev.rollczi.litecommands.reflect.type.TypeToken<?>> unwrapper, Function<?, T> wrapper) Wrappers are only used for wrapping types that are supported by Discord API, and we want to skip LiteCommands parsing.
-