Class ApplicationCommandOption
public class ApplicationCommandOption : IJsonModel<JsonApplicationCommandOption>, ISpanFormattable, IFormattable
- Inheritance
-
ApplicationCommandOption
- Implements
- Inherited Members
Constructors
ApplicationCommandOption(JsonApplicationCommandOption, string, ulong)
public ApplicationCommandOption(JsonApplicationCommandOption jsonModel, string parentName, ulong parentId)
Parameters
jsonModel
JsonApplicationCommandOptionparentName
stringparentId
ulong
Properties
Autocomplete
If autocomplete interactions are enabled for the option.
public bool Autocomplete { get; }
Property Value
ChannelTypes
If the option is a channel type, the channels shown will be restricted to these types.
public IReadOnlyList<ChannelType>? ChannelTypes { get; }
Property Value
Choices
Choices for the user to pick from (max 25).
public IReadOnlyList<ApplicationCommandOptionChoice>? Choices { get; }
Property Value
Description
Description of the option (1-100 characters).
public string Description { get; }
Property Value
DescriptionLocalizations
Localizations of Description (1-100 characters each).
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; }
Property Value
MaxLength
The maximum allowed length (0-6000).
public int? MaxLength { get; }
Property Value
- int?
MaxValue
The maximum value permitted.
public double? MaxValue { get; }
Property Value
MinLength
The minimum allowed length (0-6000).
public int? MinLength { get; }
Property Value
- int?
MinValue
The minimum value permitted.
public double? MinValue { get; }
Property Value
Name
Name of the option (1-32 characters).
public string Name { get; }
Property Value
NameLocalizations
Localizations of Name (1-32 characters each).
public IReadOnlyDictionary<string, string>? NameLocalizations { get; }
Property Value
Options
Parameters for the option (max 25).
public IReadOnlyList<ApplicationCommandOption>? Options { get; }
Property Value
Required
If the parameter is required or optional.
public bool Required { get; }
Property Value
Type
Type of the option.
public ApplicationCommandOptionType Type { get; }
Property Value
Methods
ToString()
public override string ToString()
Returns
ToString(string?, IFormatProvider?)
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
format
stringformatProvider
IFormatProvider
Returns
TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
Parameters
destination
Span<char>charsWritten
intformat
ReadOnlySpan<char>provider
IFormatProvider