We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0a420f commit d2152e7Copy full SHA for d2152e7
src/main/java/net/javadiscord/javabot/systems/commands/ChangeMyMindCommand.java
@@ -36,7 +36,7 @@ public ReplyCallbackAction handleSlashCommandInteraction(SlashCommandInteraction
36
var hook = event.getHook();
37
String encodedSearchTerm;
38
encodedSearchTerm = URLEncoder.encode(Objects.requireNonNull(event.getOption("text")).getAsString(), StandardCharsets.UTF_8);
39
- if (encodedSearchTerm.toCharArray().length > MAX_SEARCH_TERM_LENGTH) {
+ if (encodedSearchTerm.length() > MAX_SEARCH_TERM_LENGTH) {
40
return event.reply("The text you provided is too long. It may not be more than " + MAX_SEARCH_TERM_LENGTH + " characters.");
41
}
42
0 commit comments