Preview environment
class SeparatorBuilder
extends
ComponentBuilder<APISeparatorComponent>export declare class SeparatorBuilder extends ComponentBuilder<APISeparatorComponent>
Constructors
data?: Partial<APISeparatorComponent>) constructor(
data?: Partial<APISeparatorComponent>
Creates a new separator from API data.
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);
readonlyPartial<APISeparatorComponent> data :
The API data associated with this component.
Inherited from: ComponentBuilder
Clears the id of this component, defaulting to a default incremented id.
Inherited from: ComponentBuilder
setDividerdivider?: boolean) : this (
divider?: boolean
Sets whether this separator should show a divider line.
setIdid: number) : this (
id: number
Sets the id (not the custom id) for this component.
Inherited from: ComponentBuilder
setSpacingspacing: SeparatorSpacingSize) : this (
spacing: SeparatorSpacingSize
Sets the spacing of this separator.
toJSONAPISeparatorComponent () :
Serializes this builder to API-compatible JSON data.