Creates a new container from API data.
Optional
data: Partial<APIContainerComponent>The API data to create this container with
Readonly
componentsThe components within this container.
Readonly
dataThe API data associated with this component.
Adds action row components to this container.
The action row components to add
Adds file components to this container.
The file components to add
Adds media gallery components to this container.
The media gallery components to add
Adds section components to this container.
The section components to add
Adds separator components to this container.
The separator components to add
Adds text display components to this container.
The text display components to add
Clears the accent color of this container.
Clears the id of this component, defaulting to a default incremented id.
Sets the accent color of this container.
Optional
color: number | RGBTupleThe color to use
Sets the id (not the custom id) for this component.
The id for this component
Sets the spoiler status of this container.
Optional
spoiler: booleanThe spoiler status to use
Removes, replaces, or inserts components for this container.
The index to start removing, replacing or inserting components
The amount of components to remove
The components to set
Serializes this builder to API-compatible JSON data.
A builder that creates API-compatible JSON data for a container.