declare class SeparatorBuilder extends ComponentBuilder<APISeparatorComponent>A builder that creates API-compatible JSON data for separators.
Constructors
externalconstructor(data?: Partial<APISeparatorComponent>)
data?: Partial<APISeparatorComponent>
Creates a new separator.
Examples:Creating a separator from an API data object:Creating a separator using setters and API data:
const separator = new SeparatorBuilder({
spacing: SeparatorSpacingSize.Small,
divider: true,
});const separator = new SeparatorBuilder({
spacing: SeparatorSpacingSize.Large,
})
.setDivider(false);Clears the id of this component, defaulting to a default incremented id.
Inherited from: ComponentBuilder
external setDivider(divider?: boolean) : this
divider?: boolean
Sets whether this separator should show a divider line.
external setSpacing(spacing: SeparatorSpacingSize) : this
spacing: SeparatorSpacingSize
Sets the spacing of this separator.
external toJSON(validationOverride?: boolean) : APISeparatorComponent
validationOverride?: boolean
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.