Class TextInputBuilder

    • Constructor Detail

      • TextInputBuilder

        public TextInputBuilder​(TextInputStyle style,
                                java.lang.String customId,
                                java.lang.String label)
        Creates a new text input builder.
        Parameters:
        style - The style of the text input.
        customId - The custom id of the text input.
        label - The label of the text input.
      • TextInputBuilder

        public TextInputBuilder​(int style,
                                java.lang.String customId,
                                java.lang.String label)
        Creates a new text input builder.
        Parameters:
        style - The style of the text input.
        customId - The custom id of the text input.
        label - The label of the text input.
    • Method Detail

      • copy

        public TextInputBuilder copy​(TextInput textInput)
        Copy a Text Input's value into this builder.
        Parameters:
        textInput - The Text Input to copy.
        Returns:
        The builder instance to chain methods.
      • setStyle

        public TextInputBuilder setStyle​(TextInputStyle style)
        Set the Text Input's style.
        Parameters:
        style - A new Text Input style.
        Returns:
        The builder instance to chain methods.
      • setStyle

        public TextInputBuilder setStyle​(int styleValue)
        Set the Text Input's style.
        Parameters:
        styleValue - The style of the Text Input based on Discord's style values.
        Returns:
        The current instance in order to chain call methods.
      • setLabel

        public TextInputBuilder setLabel​(java.lang.String label)
        Set the Text Input's label.
        Parameters:
        label - The Text Input's label.
        Returns:
        The current instance in order to chain call methods.
      • setPlaceholder

        public TextInputBuilder setPlaceholder​(java.lang.String placeholder)
        Set the Text Input's placeholder.
        Parameters:
        placeholder - The Text Input's placeholder.
        Returns:
        The current instance in order to chain call methods.
      • setValue

        public TextInputBuilder setValue​(java.lang.String value)
        Set the Text Input's value.
        Parameters:
        value - The Text Input's value.
        Returns:
        The current instance in order to chain call methods.
      • setMinimumLength

        public TextInputBuilder setMinimumLength​(java.lang.Integer minimumLength)
        Set the Text Input's minimum length.
        Parameters:
        minimumLength - The Text Input's minimum length.
        Returns:
        The current instance in order to chain call methods.
      • setMaximumLength

        public TextInputBuilder setMaximumLength​(java.lang.Integer maximumLength)
        Set the Text Input's maximum length.
        Parameters:
        maximumLength - The Text Input's maximum length.
        Returns:
        The current instance in order to chain call methods.
      • setCustomId

        public TextInputBuilder setCustomId​(java.lang.String customId)
        Set the Text Input's custom ID.
        Parameters:
        customId - The Text Input's identifier.
        Returns:
        The current instance in order to chain call methods.
      • setRequired

        public TextInputBuilder setRequired​(boolean required)
        Set whether this Text Input is required.
        Parameters:
        required - Whether the Text Input is required or not.
        Returns:
        The current instance in order to chain call methods.
      • build

        public TextInput build()
        Creates a TextInput instance with the given values.
        Returns:
        The created TextInput instance.