Interface ItemComponent

All Superinterfaces:
Component, SerializableData
All Known Subinterfaces:
ActionComponent, Button, EntitySelectMenu, SelectMenu, StringSelectMenu, TextInput

public interface ItemComponent extends Component
Component which can be inserted into a LayoutComponent.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.dv8tion.jda.api.interactions.components.Component

    Component.Type
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    How many of these components can be added to one ActionRow.
    default boolean
    Whether this Component is compatible with Messages.
    default boolean
    Whether this Component is compatible with Modals.

    Methods inherited from interface net.dv8tion.jda.api.interactions.components.Component

    getType

    Methods inherited from interface net.dv8tion.jda.api.utils.data.SerializableData

    toData
  • Method Details

    • getMaxPerRow

      default int getMaxPerRow()
      How many of these components can be added to one ActionRow.
      Returns:
      The maximum amount an action row can contain
    • isModalCompatible

      default boolean isModalCompatible()
      Description copied from interface: Component
      Whether this Component is compatible with Modals.
      If the component in question is a LayoutComponent, this also checks every component inside it.
      Specified by:
      isModalCompatible in interface Component
      Returns:
      True, if this Component is compatible with modals.
    • isMessageCompatible

      default boolean isMessageCompatible()
      Description copied from interface: Component
      Whether this Component is compatible with Messages.
      If the component in question is a LayoutComponent, this also checks every component inside it.
      Specified by:
      isMessageCompatible in interface Component
      Returns:
      True, if this Component is compatible with messages.