Preview environment

class SectionComponent

export class SectionComponent<AccessoryType extends ButtonComponent | ThumbnailComponent = ButtonComponent | ThumbnailComponent,> extends Component<APISectionComponent>

Represents a section component

Type Parameters

readonly
accessory : AccessoryType

The accessory component of this section

readonly
components : TextDisplayComponent[]

The components in this section

readonly
data : Readonly<APISectionComponent>

The API data associated with this component

Inherited from: Component

readonly
id : APISectionComponent['id']

The id of this component

Inherited from: Component

readonly
type : APISectionComponent['type']

The type of the component

Inherited from: Component

equals(
other: this | APISectionComponent
) : boolean

Whether or not the given components are equal

Inherited from: Component

Returns the API-compatible JSON for this component