Table of Contents

Class SeparatorBuilder

Namespace
Discord
Assembly
Discord.Net.Core.dll
public class SeparatorBuilder : IMessageComponentBuilder
Inheritance
SeparatorBuilder
Implements
Inherited Members
Extension Methods

Constructors

SeparatorBuilder(SeparatorComponent)

Initializes a new SeparatorBuilder from existing component.

public SeparatorBuilder(SeparatorComponent separator)

Parameters

separator SeparatorComponent

SeparatorBuilder(bool, SeparatorSpacingSize)

Initializes a new SeparatorBuilder.

public SeparatorBuilder(bool isDivider = true, SeparatorSpacingSize spacing = SeparatorSpacingSize.Small)

Parameters

isDivider bool
spacing SeparatorSpacingSize

Properties

Id

Gets or sets the id for the component. An autoincremented id will be assigned if not set.

public int? Id { get; set; }

Property Value

int?

IsDivider

Gets or sets whether the component is a divider.

public bool? IsDivider { get; set; }

Property Value

bool?

Spacing

Gets or sets the spacing of the separator.

public SeparatorSpacingSize? Spacing { get; set; }

Property Value

SeparatorSpacingSize?

Type

Gets the type of the component.

public ComponentType Type { get; }

Property Value

ComponentType

Methods

Build()

Runs validation checks and builds the component.

public SeparatorComponent Build()

Returns

SeparatorComponent

WithIsDivider(bool?)

Sets whether the component is a divider.

public SeparatorBuilder WithIsDivider(bool? isDivider)

Parameters

isDivider bool?

Returns

SeparatorBuilder

The current builder.

WithSpacing(SeparatorSpacingSize?)

Sets the spacing of the separator.

public SeparatorBuilder WithSpacing(SeparatorSpacingSize? spacing)

Parameters

spacing SeparatorSpacingSize?

Returns

SeparatorBuilder

The current builder.