From 73342c7c6ef6e33b2d02c3976c549ddd4f19c385 Mon Sep 17 00:00:00 2001 From: nev-r Date: Wed, 1 Dec 2021 13:12:35 -0800 Subject: [PATCH] correct the number of allowed autocomplete choices (#333) --- .../Entities/Interactions/InteractionHelper.cs | 2 +- .../Interactions/SlashCommands/RestAutocompleteInteraction.cs | 4 ++-- .../SlashCommands/SocketAutocompleteInteraction.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs index 7cfc6a2ec..ed537a062 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs @@ -427,7 +427,7 @@ namespace Discord.Rest { result ??= Array.Empty(); - 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 { diff --git a/src/Discord.Net.Rest/Entities/Interactions/SlashCommands/RestAutocompleteInteraction.cs b/src/Discord.Net.Rest/Entities/Interactions/SlashCommands/RestAutocompleteInteraction.cs index 3b879cd4e..8737dc5ac 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/SlashCommands/RestAutocompleteInteraction.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/SlashCommands/RestAutocompleteInteraction.cs @@ -46,7 +46,7 @@ namespace Discord.Rest /// /// The set of choices for the user to pick from. /// - /// A max of 20 choices are allowed. Passing for this argument will show the executing user that + /// A max of 25 choices are allowed. Passing for this argument will show the executing user that /// there is no choices for their autocompleted input. /// /// @@ -93,7 +93,7 @@ namespace Discord.Rest /// /// The set of choices for the user to pick from. /// - /// A max of 20 choices are allowed. Passing for this argument will show the executing user that + /// A max of 25 choices are allowed. Passing for this argument will show the executing user that /// there is no choices for their autocompleted input. /// /// diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SlashCommands/SocketAutocompleteInteraction.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SlashCommands/SocketAutocompleteInteraction.cs index 5637cb6f0..0f598586b 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/SlashCommands/SocketAutocompleteInteraction.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/SlashCommands/SocketAutocompleteInteraction.cs @@ -45,7 +45,7 @@ namespace Discord.WebSocket /// /// The set of choices for the user to pick from. /// - /// A max of 20 choices are allowed. Passing for this argument will show the executing user that + /// A max of 25 choices are allowed. Passing for this argument will show the executing user that /// there is no choices for their autocompleted input. /// /// @@ -80,7 +80,7 @@ namespace Discord.WebSocket /// /// The set of choices for the user to pick from. /// - /// A max of 20 choices are allowed. Passing for this argument will show the executing user that + /// A max of 25 choices are allowed. Passing for this argument will show the executing user that /// there is no choices for their autocompleted input. /// ///