Class SlashCommandOptionCustomizer

java.lang.Object
org.prithvidiamond1.SlashCommandCustomizers.SlashCommandOptionCustomizer
Direct Known Subclasses:
SlashCommandSubCommandCustomizer

public abstract class SlashCommandOptionCustomizer extends Object
Interface that allows for the customization of slash commands using options
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor of this abstract class
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCommandOption(org.javacord.api.interaction.SlashCommandOptionType optionType, String optionName, String optionDesc, boolean required)
    Method to add an option to the slash command
    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
    List<org.javacord.api.interaction.SlashCommandOption>
    Method that returns the list of options added to the slash command

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 option
      optionName - the name of the option
      optionDesc - the description of the option
      required - 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 option
      optionName - the name of the option
      optionDesc - the description of the option
      required - if the option is required or not to run the slash command
      optionChoices - the choices for the option
    • getOptionList

      public List<org.javacord.api.interaction.SlashCommandOption> getOptionList()
      Method that returns the list of options added to the slash command
      Returns:
      a list of the options added to the slash command