From 2f23965e9a6b6ea601381ef60dcca1cf77a6ad3f Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Fri, 30 Oct 2020 13:48:36 +0100 Subject: [PATCH] Fixed out of bounds error on downloading due to some recent changes on the way it checks for arguments Signed-off-by: Louis Vallat --- src/main/java/xyz/vallat/louis/commands/Download.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/xyz/vallat/louis/commands/Download.java b/src/main/java/xyz/vallat/louis/commands/Download.java index e06aacd..96969cb 100644 --- a/src/main/java/xyz/vallat/louis/commands/Download.java +++ b/src/main/java/xyz/vallat/louis/commands/Download.java @@ -38,7 +38,7 @@ public class Download extends Command { public Mono execute(MessageCreateEvent event) { List args = getArguments(event); if (args.size() < minArgs) return notEnoughArguments(event); - String value = String.join(" ", args.subList(3, args.size())); + String value = String.join(" ", args.subList(2, args.size())); if (!args.get(1).equalsIgnoreCase("imdb") && !args.get(1).equalsIgnoreCase("title")) return badArgument(event, args.get(1)); int languageId = LanguageManager.getIdLanguage(args.get(0));