Table of Contents

Class ChannelMenuProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class ChannelMenuProperties : EntityMenuProperties
Inheritance
ChannelMenuProperties
Inherited Members

Constructors

ChannelMenuProperties(string)

public ChannelMenuProperties(string customId)

Parameters

customId string

ID for the menu (max 100 characters).

Properties

ChannelTypes

List of channel types to include in the menu.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("channel_types")]
public IEnumerable<ChannelType>? ChannelTypes { get; set; }

Property Value

IEnumerable<ChannelType>

ComponentType

Type of the component.

public override ComponentType ComponentType { get; }

Property Value

ComponentType

DefaultValues

Default values for auto-populated select menu components.

[JsonConverter(typeof(ChannelMenuProperties.DefaultValuesConverter))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("default_values")]
public IEnumerable<ulong>? DefaultValues { get; set; }

Property Value

IEnumerable<ulong>

Methods

AddChannelTypes(params ChannelType[])

List of channel types to include in the menu.

public ChannelMenuProperties AddChannelTypes(params ChannelType[] channelTypes)

Parameters

channelTypes ChannelType[]

Returns

ChannelMenuProperties

AddChannelTypes(IEnumerable<ChannelType>)

List of channel types to include in the menu.

public ChannelMenuProperties AddChannelTypes(IEnumerable<ChannelType> channelTypes)

Parameters

channelTypes IEnumerable<ChannelType>

Returns

ChannelMenuProperties

AddDefaultValues(IEnumerable<ulong>)

Default values for auto-populated select menu components.

public ChannelMenuProperties AddDefaultValues(IEnumerable<ulong> defaultValues)

Parameters

defaultValues IEnumerable<ulong>

Returns

ChannelMenuProperties

AddDefaultValues(params ulong[])

Default values for auto-populated select menu components.

public ChannelMenuProperties AddDefaultValues(params ulong[] defaultValues)

Parameters

defaultValues ulong[]

Returns

ChannelMenuProperties

WithChannelTypes(IEnumerable<ChannelType>?)

List of channel types to include in the menu.

public ChannelMenuProperties WithChannelTypes(IEnumerable<ChannelType>? channelTypes)

Parameters

channelTypes IEnumerable<ChannelType>

Returns

ChannelMenuProperties

WithCustomId(string)

ID for the menu (max 100 characters).

public ChannelMenuProperties WithCustomId(string customId)

Parameters

customId string

Returns

ChannelMenuProperties

WithDefaultValues(IEnumerable<ulong>?)

Default values for auto-populated select menu components.

public ChannelMenuProperties WithDefaultValues(IEnumerable<ulong>? defaultValues)

Parameters

defaultValues IEnumerable<ulong>

Returns

ChannelMenuProperties

WithDisabled(bool)

Whether the menu is disabled.

public ChannelMenuProperties WithDisabled(bool disabled = true)

Parameters

disabled bool

Returns

ChannelMenuProperties

WithMaxValues(int?)

Maximum number of items that can be chosen, default 1 (max 25).

public ChannelMenuProperties WithMaxValues(int? maxValues)

Parameters

maxValues int?

Returns

ChannelMenuProperties

WithMinValues(int?)

Minimum number of items that must be chosen, default 1 (0-25).

public ChannelMenuProperties WithMinValues(int? minValues)

Parameters

minValues int?

Returns

ChannelMenuProperties

WithPlaceholder(string?)

Placeholder text if nothing is selected (max 150 characters).

public ChannelMenuProperties WithPlaceholder(string? placeholder)

Parameters

placeholder string

Returns

ChannelMenuProperties