Max/Min length fields for ApplicationCommandOption (#2379)
* implement max/min length fields for ApplicationCommandOption * fix badly formed xml comments
This commit is contained in:
@@ -33,6 +33,12 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc/>
|
||||
public double? MaxValue { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int? MinLength { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int? MaxLength { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of choices for the user to pick from.
|
||||
/// </summary>
|
||||
@@ -72,6 +78,9 @@ namespace Discord.WebSocket
|
||||
|
||||
IsAutocomplete = model.Autocomplete.ToNullable();
|
||||
|
||||
MinLength = model.MinLength.ToNullable();
|
||||
MaxLength = model.MaxLength.ToNullable();
|
||||
|
||||
Choices = model.Choices.IsSpecified
|
||||
? model.Choices.Value.Select(SocketApplicationCommandChoice.Create).ToImmutableArray()
|
||||
: ImmutableArray.Create<SocketApplicationCommandChoice>();
|
||||
|
||||
Reference in New Issue
Block a user