You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove deprecated parts of the code
* Fix argument identification in autocompletes
* Handle limitations of options
* Limit concatenation to InputArguments
* Add action listener to SubArgument
* Update example
@@ -69,7 +69,7 @@ public Command(String name, String description) {
69
69
thrownewIllegalArgumentException("Command's name is invalid, it should contain only word characters, '-' and '_' character, and its length must between 1 and 32");
70
70
}
71
71
72
-
if (description.length() < 1 || description.length() > 100) {
72
+
if (description.isEmpty() || description.length() > 100) {
73
73
thrownewIllegalArgumentException("Description's length must between 1 and 100");
74
74
}
75
75
}
@@ -80,11 +80,25 @@ public Command(String name, String description) {
if (!name.matches("^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}$")) {
57
-
thrownewIllegalArgumentException("Command's name is invalid, it should contain only word characters, '-' and '_' character, and its length must between 1 and 32");
54
+
thrownewIllegalArgumentException("Argument's name is invalid, it should contain only word characters, '-' and '_' character, and its length must between 1 and 32");
58
55
}
59
56
60
-
if (description.length() < 1 || description.length() > 100) {
57
+
if (description.isEmpty() || description.length() > 100) {
61
58
thrownewIllegalArgumentException("Description's length must between 1 and 100");
62
59
}
63
60
}
@@ -93,26 +90,4 @@ public SlashCommandOptionType getType() {
0 commit comments