Interface LowLevelComponent

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default java.util.Optional<Button> asButton()
      Gets the component as a Button if it's of that type.
      default java.util.Optional<SelectMenu> asSelectMenu()
      Gets the component as a SelectMenu if it's of that type.
      default java.util.Optional<TextInput> asTextInput()
      Gets the component as a TextInput if it's of that type.
      default boolean isButton()
      Whether this component is of this type.
      default boolean isSelectMenu()
      Whether this component is of this type.
      default boolean isTextInput()
      Whether this component is of this type.
      • Methods inherited from interface org.javacord.api.entity.message.component.Component

        getType
    • Method Detail

      • isButton

        default boolean isButton()
        Whether this component is of this type.
        Returns:
        True if it's of that type.
      • asButton

        default java.util.Optional<Button> asButton()
        Gets the component as a Button if it's of that type.
        Returns:
        The Button.
      • isSelectMenu

        default boolean isSelectMenu()
        Whether this component is of this type.
        Returns:
        True if it's of that type.
      • asSelectMenu

        default java.util.Optional<SelectMenu> asSelectMenu()
        Gets the component as a SelectMenu if it's of that type.
        Returns:
        The SelectMenu.
      • isTextInput

        default boolean isTextInput()
        Whether this component is of this type.
        Returns:
        True if it's of that type.
      • asTextInput

        default java.util.Optional<TextInput> asTextInput()
        Gets the component as a TextInput if it's of that type.
        Returns:
        The SelectMenu.