Skip to content

Commit d2152e7

Browse files
committed
Changed to plain length call after testing.
1 parent a0a420f commit d2152e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/commands/ChangeMyMindCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public ReplyCallbackAction handleSlashCommandInteraction(SlashCommandInteraction
3636
var hook = event.getHook();
3737
String encodedSearchTerm;
3838
encodedSearchTerm = URLEncoder.encode(Objects.requireNonNull(event.getOption("text")).getAsString(), StandardCharsets.UTF_8);
39-
if (encodedSearchTerm.toCharArray().length > MAX_SEARCH_TERM_LENGTH) {
39+
if (encodedSearchTerm.length() > MAX_SEARCH_TERM_LENGTH) {
4040
return event.reply("The text you provided is too long. It may not be more than " + MAX_SEARCH_TERM_LENGTH + " characters.");
4141
}
4242

0 commit comments

Comments
 (0)