Interface UnknownComponent

All Superinterfaces:
Component
All Known Implementing Classes:
UnknownComponentImpl

public interface UnknownComponent extends Component
Represents a component which has an unknown type.

Such components can be received and serialized, but cannot be sent or modified in any way.

See Also:
  • Method Details

    • getType

      @Nonnull default Component.Type getType()
      Description copied from interface: Component
      The type of component.
      Specified by:
      getType in interface Component
      Returns:
      Component.Type
    • withUniqueId

      @Nonnull UnknownComponent withUniqueId(int uniqueId)
      Description copied from interface: Component
      Creates a new component with the provided numeric ID.
      If no ID is set, Discord will generate IDs incrementally starting from 1 and will not use existing IDs from the same message/modal.
      Specified by:
      withUniqueId in interface Component
      Parameters:
      uniqueId - The new ID; must be higher or equal to 1
      Returns:
      The new component