Refactored and added a way to list a movie's subtitle languages by imdb id and title

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2020-10-29 00:03:55 +01:00
parent 256d2f7667
commit 5a85141611

View File

@ -14,11 +14,14 @@ public class ListLangMovieTitle extends Command {
private static final ReactionEmoji WAITING = ReactionEmoji.unicode("");
public ListLangMovieTitle(String name) {
super(name, "List all languages attached to a film title.", name + " title", 1, 2);
super(name, "List all languages attached to a film title or an IMDB Identifier.",
name + " imdb|title value", 3, 3);
}
@Override
public Mono<Void> execute(MessageCreateEvent event) {
if (event.getMessage().getContent().split(" ").length < minArgs) return notEnoughArguments(event);
boolean isId = event.getMessage().getContent().split(" ")
String arg = event.getMessage().getContent().substring(name.length() + 1);
if (arg.isBlank()) return notEnoughArguments(event);
logger.debug("Executing command with argument '{}'.", arg);