Interface SlashCommandOptionBuilderDelegate


  • public interface SlashCommandOptionBuilderDelegate
    This class is internally used by the SlashCommandOptionBuilder. You usually don't want to interact with this object.
    • Method Detail

      • setType

        void setType​(SlashCommandOptionType type)
        Sets the type of the slash command option.
        Parameters:
        type - The type.
      • setName

        void setName​(java.lang.String name)
        Sets the name of the slash command option.
        Parameters:
        name - The name.
      • addNameLocalization

        void addNameLocalization​(DiscordLocale locale,
                                 java.lang.String localization)
        Adds a name localization for the given locale.
        Parameters:
        locale - The locale to add this localization for.
        localization - The command name localization.
      • setDescription

        void setDescription​(java.lang.String description)
        Sets the description of the slash command option.
        Parameters:
        description - The description.
      • addDescriptionLocalization

        void addDescriptionLocalization​(DiscordLocale locale,
                                        java.lang.String localization)
        Adds a description localization for the given locale.
        Parameters:
        locale - The locale to add this localization for.
        localization - The command description localization.
      • setRequired

        void setRequired​(boolean required)
        Sets if the slash command option is required.
        Parameters:
        required - Whether the option is required.
      • setAutocompletable

        void setAutocompletable​(boolean autocompletable)
        Sets if this option can be autocompleted.
        Parameters:
        autocompletable - Whether the option can be autocompleted.
      • addChoice

        void addChoice​(SlashCommandOptionChoice choice)
        Adds a choice for the slash command option.
        Parameters:
        choice - The choice.
      • setChoices

        void setChoices​(java.util.List<SlashCommandOptionChoice> choices)
        Sets the choices of the slash command option.
        Parameters:
        choices - The choices.
      • addOption

        void addOption​(SlashCommandOption option)
        Adds a slash command option to the slash command option.
        Parameters:
        option - The option.
      • setOptions

        void setOptions​(java.util.List<SlashCommandOption> options)
        Sets the slash commands for the slash command option.
        Parameters:
        options - The options.
      • addChannelType

        void addChannelType​(ChannelType channelType)
        Add a channel type to the slash command option.
        Parameters:
        channelType - The channel type.
      • setChannelTypes

        void setChannelTypes​(java.util.Collection<ChannelType> channelTypes)
        Sets the channel types for the slash command option.
        Parameters:
        channelTypes - The channel types.
      • setLongMinValue

        void setLongMinValue​(long longMinValue)
        Sets the SlashCommandOptionType.LONG min value for the slash command option.
        Parameters:
        longMinValue - The long min value.
      • setLongMaxValue

        void setLongMaxValue​(long longMaxValue)
        Sets the SlashCommandOptionType.LONG max value for the slash command option.
        Parameters:
        longMaxValue - The long max value.
      • setDecimalMinValue

        void setDecimalMinValue​(double decimalMinValue)
        Sets the SlashCommandOptionType.DECIMAL min value for the slash command option.
        Parameters:
        decimalMinValue - The decimal min value.
      • setDecimalMaxValue

        void setDecimalMaxValue​(double decimalMaxValue)
        Sets the SlashCommandOptionType.DECIMAL max value for the slash command option.
        Parameters:
        decimalMaxValue - The decimal max value.
      • build

        SlashCommandOption build()
        Build the slash command option.
        Returns:
        The built option.