Class SlashCommandOptionCustomizer
java.lang.Object
org.prithvidiamond1.SlashCommandCustomizers.SlashCommandOptionCustomizer
- Direct Known Subclasses:
SlashCommandSubCommandCustomizer
Interface that allows for the customization of slash commands using options
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommandOption
(org.javacord.api.interaction.SlashCommandOptionType optionType, String optionName, String optionDesc, boolean required) Method to add an option to the slash commandvoid
addCommandOptionWithChoices
(org.javacord.api.interaction.SlashCommandOptionType optionType, String optionName, String optionDesc, boolean required, List<org.javacord.api.interaction.SlashCommandOptionChoice> optionChoices) Method to add an option with option choices to the slash commandList<org.javacord.api.interaction.SlashCommandOption>
Method that returns the list of options added to the slash command
-
Constructor Details
-
SlashCommandOptionCustomizer
public SlashCommandOptionCustomizer()Constructor of this abstract class
-
-
Method Details
-
addCommandOption
public void addCommandOption(org.javacord.api.interaction.SlashCommandOptionType optionType, String optionName, String optionDesc, boolean required) Method to add an option to the slash command- Parameters:
optionType
- the type of the optionoptionName
- the name of the optionoptionDesc
- the description of the optionrequired
- if the option is required or not to run the slash command
-
addCommandOptionWithChoices
public void addCommandOptionWithChoices(org.javacord.api.interaction.SlashCommandOptionType optionType, String optionName, String optionDesc, boolean required, List<org.javacord.api.interaction.SlashCommandOptionChoice> optionChoices) Method to add an option with option choices to the slash command- Parameters:
optionType
- the type of the optionoptionName
- the name of the optionoptionDesc
- the description of the optionrequired
- if the option is required or not to run the slash commandoptionChoices
- the choices for the option
-
getOptionList
Method that returns the list of options added to the slash command- Returns:
- a list of the options added to the slash command
-