Fixed out of bounds error on downloading due to some recent changes on the way it checks for arguments
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
059da9fce7
commit
2f23965e9a
@ -38,7 +38,7 @@ public class Download extends Command {
|
||||
public Mono<Void> execute(MessageCreateEvent event) {
|
||||
List<String> 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));
|
||||
|
Loading…
Reference in New Issue
Block a user