Table of Contents

Class LabelProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class LabelProperties : IModalComponentProperties, IComponentProperties, IJsonSerializable<IModalComponentProperties>
Inheritance
LabelProperties
Implements
Inherited Members

Constructors

LabelProperties(string, ILabelComponentProperties)

public LabelProperties(string label, ILabelComponentProperties component)

Parameters

label string
component ILabelComponentProperties

Properties

Component

[JsonPropertyName("component")]
public ILabelComponentProperties Component { get; set; }

Property Value

ILabelComponentProperties

ComponentType

Type of the component.

[JsonPropertyName("type")]
public ComponentType ComponentType { get; }

Property Value

ComponentType

Description

[JsonPropertyName("description")]
public string? Description { get; set; }

Property Value

string

Id

Unique identifier for the component. Auto populated through increment if not provided.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("id")]
public int? Id { get; set; }

Property Value

int?

Label

[JsonPropertyName("label")]
public string Label { get; set; }

Property Value

string

Methods

WithComponent(ILabelComponentProperties)

public LabelProperties WithComponent(ILabelComponentProperties component)

Parameters

component ILabelComponentProperties

Returns

LabelProperties

WithDescription(string?)

public LabelProperties WithDescription(string? description)

Parameters

description string

Returns

LabelProperties

WithId(int?)

Unique identifier for the component. Auto populated through increment if not provided.

public LabelProperties WithId(int? id)

Parameters

id int?

Returns

LabelProperties

WithLabel(string)

public LabelProperties WithLabel(string label)

Parameters

label string

Returns

LabelProperties