Browse Source

correct the number of allowed autocomplete choices (#334)

pull/1958/head
nev-r GitHub 3 years ago
parent
commit
27782a9d24
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions
  1. +1
    -1
      src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs
  2. +2
    -2
      src/Discord.Net.Rest/Entities/Interactions/SlashCommands/RestAutocompleteInteraction.cs
  3. +2
    -2
      src/Discord.Net.WebSocket/Entities/Interaction/SlashCommands/SocketAutocompleteInteraction.cs

+ 1
- 1
src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs View File

@@ -427,7 +427,7 @@ namespace Discord.Rest
{
result ??= Array.Empty<AutocompleteResult>();

Preconditions.AtMost(result.Count(), 20, nameof(result), "A maximum of 20 choices are allowed!");
Preconditions.AtMost(result.Count(), 25, nameof(result), "A maximum of 25 choices are allowed!");

var apiArgs = new InteractionResponse
{


+ 2
- 2
src/Discord.Net.Rest/Entities/Interactions/SlashCommands/RestAutocompleteInteraction.cs View File

@@ -46,7 +46,7 @@ namespace Discord.Rest
/// <param name="result">
/// The set of choices for the user to pick from.
/// <remarks>
/// A max of 20 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// A max of 25 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// there is no choices for their autocompleted input.
/// </remarks>
/// </param>
@@ -93,7 +93,7 @@ namespace Discord.Rest
/// <param name="result">
/// The set of choices for the user to pick from.
/// <remarks>
/// A max of 20 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// A max of 25 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// there is no choices for their autocompleted input.
/// </remarks>
/// </param>


+ 2
- 2
src/Discord.Net.WebSocket/Entities/Interaction/SlashCommands/SocketAutocompleteInteraction.cs View File

@@ -45,7 +45,7 @@ namespace Discord.WebSocket
/// <param name="result">
/// The set of choices for the user to pick from.
/// <remarks>
/// A max of 20 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// A max of 25 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// there is no choices for their autocompleted input.
/// </remarks>
/// </param>
@@ -80,7 +80,7 @@ namespace Discord.WebSocket
/// <param name="result">
/// The set of choices for the user to pick from.
/// <remarks>
/// A max of 20 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// A max of 25 choices are allowed. Passing <see langword="null"/> for this argument will show the executing user that
/// there is no choices for their autocompleted input.
/// </remarks>
/// </param>


Loading…
Cancel
Save