Enum Component.Type

java.lang.Object
java.lang.Enum<Component.Type>
net.dv8tion.jda.api.components.Component.Type
All Implemented Interfaces:
Serializable, Comparable<Component.Type>
Enclosing interface:
Component

public static enum Component.Type extends Enum<Component.Type>
The component types
  • Enum Constant Details

    • UNKNOWN

      public static final Component.Type UNKNOWN
    • ACTION_ROW

      public static final Component.Type ACTION_ROW
      A row of components
    • BUTTON

      public static final Component.Type BUTTON
      A button
    • STRING_SELECT

      public static final Component.Type STRING_SELECT
      A select menu of strings
    • TEXT_INPUT

      public static final Component.Type TEXT_INPUT
      A text input field
    • USER_SELECT

      public static final Component.Type USER_SELECT
      A select menu of users
    • ROLE_SELECT

      public static final Component.Type ROLE_SELECT
      A select menu of roles
    • MENTIONABLE_SELECT

      public static final Component.Type MENTIONABLE_SELECT
      A select menu of users and roles
    • CHANNEL_SELECT

      public static final Component.Type CHANNEL_SELECT
      A select menu of channels
    • SECTION

      public static final Component.Type SECTION
    • TEXT_DISPLAY

      public static final Component.Type TEXT_DISPLAY
    • THUMBNAIL

      public static final Component.Type THUMBNAIL
    • FILE_DISPLAY

      public static final Component.Type FILE_DISPLAY
    • SEPARATOR

      public static final Component.Type SEPARATOR
    • CONTAINER

      public static final Component.Type CONTAINER
  • Method Details

    • values

      public static Component.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Component.Type valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getMaxPerRow

      @Deprecated @ForRemoval @ReplaceWith("ActionRow.getMaxAllowed(Component.Type)") public int getMaxPerRow()
      Deprecated.
      How many components of this type can be added to one ActionRow.
      Returns:
      The maximum amount an action row can contain
    • getKey

      public int getKey()
      Raw int representing this ComponentType

      This returns -1 if it's of type UNKNOWN.

      Returns:
      Raw int representing this ComponentType
    • isMessageCompatible

      public boolean isMessageCompatible()
      Whether this component can be used in Messages.
      Returns:
      Whether this component can be used in Messages.
    • isModalCompatible

      public boolean isModalCompatible()
      Whether this component can be used in Modals.
      Returns:
      Whether this component can be used in Modals.
    • fromKey

      @Nonnull public static Component.Type fromKey(int type)
      Maps the provided type id to the respective enum instance.
      Parameters:
      type - The raw type id
      Returns:
      The Type or UNKNOWN