diff --git a/src/main/java/xyz/vallat/louis/commands/Command.java b/src/main/java/xyz/vallat/louis/commands/Command.java index f1c8a6c..503f48b 100644 --- a/src/main/java/xyz/vallat/louis/commands/Command.java +++ b/src/main/java/xyz/vallat/louis/commands/Command.java @@ -14,7 +14,6 @@ import xyz.vallat.louis.omdb.objects.Movie; import xyz.vallat.louis.subtitles.OpenSubtitles; import java.io.IOException; -import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; @@ -48,7 +47,6 @@ public abstract class Command { public abstract Mono execute(MessageCreateEvent event); - // TODO: RECODE THIS TO USE THE OPTIONS SYSTEM public String getUsage() { return "``" + this.usage + "``"; } @@ -69,19 +67,6 @@ public abstract class Command { return name; } - protected Mono notEnoughArguments(MessageCreateEvent event) { - return event.getMessage().getChannel() - .flatMap(channel -> channel.createMessage("Error, you're missing some arguments.\n" + getUsage())) - .then(); - } - - protected Mono badArgument(MessageCreateEvent event, String arg) { - return event.getMessage().getChannel() - .flatMap(channel -> - channel.createMessage("Error, this argument isn't recognized: '" + arg + "'.\n Usage: " + getUsage())) - .then(); - } - protected Mono unknownLanguage(MessageCreateEvent event, String lang) { return event.getMessage().getChannel() .flatMap(channel -> @@ -92,7 +77,7 @@ public abstract class Command { protected Mono parsingError(MessageCreateEvent event) { return event.getMessage().getChannel() .flatMap(channel -> - channel.createMessage("An error occurred while parsing your command. Usage: " + getUsage() + ".")) + channel.createMessage("An error occurred while parsing your command. Usage: " + getUsage() + ".")) .then(); } @@ -129,11 +114,6 @@ public abstract class Command { } } - protected List getArguments(MessageCreateEvent event) { - String[] arguments = event.getMessage().getContent().split(" "); - return List.of(arguments).subList(1, arguments.length); - } - protected String[] getArgArray(MessageCreateEvent event) { return event.getMessage().getContent().substring(name.length()).split(" "); }