Class MessageComponent

    • Method Detail

      • fromData

        public static MessageComponent fromData​(discord4j.discordjson.json.ComponentData data)
        Constructs a MessageComponent from raw data.

        The correct subtype will be chosen based on the component's MessageComponent.Type.

        Parameters:
        data - The raw component data.
        Returns:
        A component with the given data.
      • getData

        public discord4j.discordjson.json.ComponentData getData()
        Gets the data of the component.
        Returns:
        The data of the component.
      • getType

        public MessageComponent.Type getType()
        Gets the type of the component.
        Returns:
        The type of the component.