Interface IApplicationCommandOption
Options for the IApplicationCommand.
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public interface IApplicationCommandOption
Properties
| Improve this Doc View SourceChannelTypes
Gets the allowed channel types for this option.
Declaration
IReadOnlyCollection<ChannelType> ChannelTypes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<ChannelType> |
Choices
Gets the choices for string and int types for the user to pick from.
Declaration
IReadOnlyCollection<IApplicationCommandOptionChoice> Choices { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IApplicationCommandOptionChoice> |
Description
Gets the description of this command option.
Declaration
string Description { get; }
Property Value
Type | Description |
---|---|
String |
DescriptionLocalizations
Gets the localization dictionary for the description field of this command option.
Declaration
IReadOnlyDictionary<string, string> DescriptionLocalizations { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, String> |
DescriptionLocalized
Gets the localized description of this command option.
Declaration
string DescriptionLocalized { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Only returned when the withLocalizations
query parameter is set to true when requesting the command.
IsAutocomplete
Gets whether or not the option has autocomplete enabled.
Declaration
bool? IsAutocomplete { get; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
IsDefault
Gets whether or not this is the first required option for the user to complete.
Declaration
bool? IsDefault { get; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
IsRequired
Gets whether or not the parameter is required or optional.
Declaration
bool? IsRequired { get; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
MaxLength
Gets the maximum allowed length for a string input.
Declaration
int? MaxLength { get; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
MaxValue
Gets the largest number value the user can input.
Declaration
double? MaxValue { get; }
Property Value
Type | Description |
---|---|
Nullable<Double> |
MinLength
Gets the minimum allowed length for a string input.
Declaration
int? MinLength { get; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
MinValue
Gets the smallest number value the user can input.
Declaration
double? MinValue { get; }
Property Value
Type | Description |
---|---|
Nullable<Double> |
Name
Gets the name of this command option.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
String |
NameLocalizations
Gets the localization dictionary for the name field of this command option.
Declaration
IReadOnlyDictionary<string, string> NameLocalizations { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, String> |
NameLocalized
Gets the localized name of this command option.
Declaration
string NameLocalized { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Only returned when the withLocalizations
query parameter is set to false when requesting the command.
Options
Gets the sub-options for this command option.
Declaration
IReadOnlyCollection<IApplicationCommandOption> Options { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IApplicationCommandOption> |
Type
Gets the type of this IApplicationCommandOption.
Declaration
ApplicationCommandOptionType Type { get; }
Property Value
Type | Description |
---|---|
ApplicationCommandOptionType |