Class ApplicationCommandOptionChoiceProperties
[JsonConverter(typeof(ApplicationCommandOptionChoiceProperties.ApplicationCommandOptionChoicePropertiesConverter))]
public class ApplicationCommandOptionChoiceProperties
- Inheritance
-
ApplicationCommandOptionChoiceProperties
- Inherited Members
Constructors
ApplicationCommandOptionChoiceProperties(string, double)
public ApplicationCommandOptionChoiceProperties(string name, double numericValue)
Parameters
ApplicationCommandOptionChoiceProperties(string, string)
public ApplicationCommandOptionChoiceProperties(string name, string stringValue)
Parameters
Properties
Name
Name of the choice (1-100 characters).
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
NameLocalizations
Localizations of Name (1-100 characters each).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name_localizations")]
public IReadOnlyDictionary<string, string>? NameLocalizations { get; set; }
Property Value
NumericValue
Numeric value for the choice (max 100 characters).
public double? NumericValue { get; set; }
Property Value
StringValue
String value for the choice (max 100 characters).
public string? StringValue { get; set; }
Property Value
ValueType
Type of value.
public ApplicationCommandOptionChoiceValueType ValueType { get; set; }
Property Value
Methods
WithName(string)
Name of the choice (1-100 characters).
public ApplicationCommandOptionChoiceProperties WithName(string name)
Parameters
namestring
Returns
WithNameLocalizations(IReadOnlyDictionary<string, string>?)
Localizations of Name (1-100 characters each).
public ApplicationCommandOptionChoiceProperties WithNameLocalizations(IReadOnlyDictionary<string, string>? nameLocalizations)
Parameters
nameLocalizationsIReadOnlyDictionary<string, string>
Returns
WithNumericValue(double?)
Numeric value for the choice (max 100 characters).
public ApplicationCommandOptionChoiceProperties WithNumericValue(double? numericValue)
Parameters
numericValuedouble?
Returns
WithStringValue(string?)
String value for the choice (max 100 characters).
public ApplicationCommandOptionChoiceProperties WithStringValue(string? stringValue)
Parameters
stringValuestring
Returns
WithValueType(ApplicationCommandOptionChoiceValueType)
Type of value.
public ApplicationCommandOptionChoiceProperties WithValueType(ApplicationCommandOptionChoiceValueType valueType)
Parameters
valueTypeApplicationCommandOptionChoiceValueType