Table of Contents

Class SocketApplicationCommandOption

Namespace
Discord.WebSocket
Assembly
Discord.Net.WebSocket.dll

Represents an option for a SocketApplicationCommand.

public class SocketApplicationCommandOption : IApplicationCommandOption
Inheritance
SocketApplicationCommandOption
Implements
Inherited Members

Properties

ChannelTypes

Gets the allowed channel types for this option.

public IReadOnlyCollection<ChannelType> ChannelTypes { get; }

Property Value

IReadOnlyCollection<ChannelType>

Choices

Gets a collection of choices for the user to pick from.

public IReadOnlyCollection<SocketApplicationCommandChoice> Choices { get; }

Property Value

IReadOnlyCollection<SocketApplicationCommandChoice>

Description

Gets the description of this command option.

public string Description { get; }

Property Value

string

DescriptionLocalizations

Gets the localization dictionary for the description field of this command option.

public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; }

Property Value

IReadOnlyDictionary<string, string>

DescriptionLocalized

Gets the localized description of this command option.

public string DescriptionLocalized { get; }

Property Value

string

Remarks

Only returned when the withLocalizations query parameter is set to false when requesting the command.

IsAutocomplete

Gets whether or not the option has autocomplete enabled.

public bool? IsAutocomplete { get; }

Property Value

bool?

IsDefault

Gets whether or not this is the first required option for the user to complete.

public bool? IsDefault { get; }

Property Value

bool?

IsRequired

Gets whether or not the parameter is required or optional.

public bool? IsRequired { get; }

Property Value

bool?

MaxLength

Gets the maximum allowed length for a string input.

public int? MaxLength { get; }

Property Value

int?

MaxValue

Gets the largest number value the user can input.

public double? MaxValue { get; }

Property Value

double?

MinLength

Gets the minimum allowed length for a string input.

public int? MinLength { get; }

Property Value

int?

MinValue

Gets the smallest number value the user can input.

public double? MinValue { get; }

Property Value

double?

Name

Gets the name of this command option.

public string Name { get; }

Property Value

string

NameLocalizations

Gets the localization dictionary for the name field of this command option.

public IReadOnlyDictionary<string, string> NameLocalizations { get; }

Property Value

IReadOnlyDictionary<string, string>

NameLocalized

Gets the localized name of this command option.

public string NameLocalized { get; }

Property Value

string

Remarks

Only returned when the withLocalizations query parameter is set to false when requesting the command.

Options

Gets a collection of nested options.

public IReadOnlyCollection<SocketApplicationCommandOption> Options { get; }

Property Value

IReadOnlyCollection<SocketApplicationCommandOption>

Type

Gets the type of this IApplicationCommandOption.

public ApplicationCommandOptionType Type { get; }

Property Value

ApplicationCommandOptionType