* Change the minimum length of slash commands to 1. This is the correct value according to the docs and it has been changed after user feedback. * Fix the limit in 3 other places Co-authored-by: quin lynch <lynchquin@gmail.com>pull/1923/head
@@ -19,7 +19,7 @@ namespace Discord | |||||
set | set | ||||
{ | { | ||||
Preconditions.NotNullOrEmpty(value, nameof(Name)); | Preconditions.NotNullOrEmpty(value, nameof(Name)); | ||||
Preconditions.AtLeast(value.Length, 3, nameof(Name)); | |||||
Preconditions.AtLeast(value.Length, 1, nameof(Name)); | |||||
Preconditions.AtMost(value.Length, MaxNameLength, nameof(Name)); | Preconditions.AtMost(value.Length, MaxNameLength, nameof(Name)); | ||||
_name = value; | _name = value; | ||||
@@ -19,7 +19,7 @@ namespace Discord | |||||
set | set | ||||
{ | { | ||||
Preconditions.NotNullOrEmpty(value, nameof(Name)); | Preconditions.NotNullOrEmpty(value, nameof(Name)); | ||||
Preconditions.AtLeast(value.Length, 3, nameof(Name)); | |||||
Preconditions.AtLeast(value.Length, 1, nameof(Name)); | |||||
Preconditions.AtMost(value.Length, MaxNameLength, nameof(Name)); | Preconditions.AtMost(value.Length, MaxNameLength, nameof(Name)); | ||||
_name = value; | _name = value; | ||||
@@ -1187,7 +1187,7 @@ namespace Discord.API | |||||
{ | { | ||||
Preconditions.NotNull(command, nameof(command)); | Preconditions.NotNull(command, nameof(command)); | ||||
Preconditions.AtMost(command.Name.Length, 32, nameof(command.Name)); | Preconditions.AtMost(command.Name.Length, 32, nameof(command.Name)); | ||||
Preconditions.AtLeast(command.Name.Length, 3, nameof(command.Name)); | |||||
Preconditions.AtLeast(command.Name.Length, 1, nameof(command.Name)); | |||||
if (command.Type == ApplicationCommandType.Slash) | if (command.Type == ApplicationCommandType.Slash) | ||||
{ | { | ||||
@@ -1258,7 +1258,7 @@ namespace Discord.API | |||||
{ | { | ||||
Preconditions.NotNull(command, nameof(command)); | Preconditions.NotNull(command, nameof(command)); | ||||
Preconditions.AtMost(command.Name.Length, 32, nameof(command.Name)); | Preconditions.AtMost(command.Name.Length, 32, nameof(command.Name)); | ||||
Preconditions.AtLeast(command.Name.Length, 3, nameof(command.Name)); | |||||
Preconditions.AtLeast(command.Name.Length, 1, nameof(command.Name)); | |||||
if (command.Type == ApplicationCommandType.Slash) | if (command.Type == ApplicationCommandType.Slash) | ||||
{ | { | ||||