Table of Contents

Class ApplicationCommandOptionProperties

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents a IApplicationCommandOption for making slash commands.

public class ApplicationCommandOptionProperties
Inheritance
ApplicationCommandOptionProperties
Inherited Members

Properties

ChannelTypes

Gets or sets the allowed channel types for this option.

public List<ChannelType> ChannelTypes { get; set; }

Property Value

List<ChannelType>

Choices

Gets or sets the choices for string and int types for the user to pick from.

public List<ApplicationCommandOptionChoiceProperties> Choices { get; set; }

Property Value

List<ApplicationCommandOptionChoiceProperties>

Description

Gets or sets the description of this option.

public string Description { get; set; }

Property Value

string

DescriptionLocalizations

Gets or sets the localization dictionary for the description field of this option.

public IDictionary<string, string> DescriptionLocalizations { get; set; }

Property Value

IDictionary<string, string>

Exceptions

ArgumentException

Thrown when any of the dictionary keys is an invalid locale.

IsAutocomplete

Gets or sets whether or not this option supports autocomplete.

public bool IsAutocomplete { get; set; }

Property Value

bool

IsDefault

Gets or sets whether or not this options is the first required option for the user to complete. only one option can be default.

public bool? IsDefault { get; set; }

Property Value

bool?

IsRequired

Gets or sets if the option is required.

public bool? IsRequired { get; set; }

Property Value

bool?

MaxLength

Gets or sets the maximum allowed length for a string input.

public int? MaxLength { get; set; }

Property Value

int?

MaxValue

Gets or sets the largest number value the user can input.

public double? MaxValue { get; set; }

Property Value

double?

MinLength

Gets or sets the minimum allowed length for a string input.

public int? MinLength { get; set; }

Property Value

int?

MinValue

Gets or sets the smallest number value the user can input.

public double? MinValue { get; set; }

Property Value

double?

Name

Gets or sets the name of this option.

public string Name { get; set; }

Property Value

string

NameLocalizations

Gets or sets the localization dictionary for the name field of this option.

public IDictionary<string, string> NameLocalizations { get; set; }

Property Value

IDictionary<string, string>

Exceptions

ArgumentException

Thrown when any of the dictionary keys is an invalid locale.

Options

Gets or sets if this option is a subcommand or subcommand group type, these nested options will be the parameters.

public List<ApplicationCommandOptionProperties> Options { get; set; }

Property Value

List<ApplicationCommandOptionProperties>

Type

Gets or sets the type of this option.

public ApplicationCommandOptionType Type { get; set; }

Property Value

ApplicationCommandOptionType