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:
parent
256d2f7667
commit
5a85141611
@ -14,11 +14,14 @@ public class ListLangMovieTitle extends Command {
|
|||||||
private static final ReactionEmoji WAITING = ReactionEmoji.unicode("⌛");
|
private static final ReactionEmoji WAITING = ReactionEmoji.unicode("⌛");
|
||||||
|
|
||||||
public ListLangMovieTitle(String name) {
|
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
|
@Override
|
||||||
public Mono<Void> execute(MessageCreateEvent event) {
|
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);
|
String arg = event.getMessage().getContent().substring(name.length() + 1);
|
||||||
if (arg.isBlank()) return notEnoughArguments(event);
|
if (arg.isBlank()) return notEnoughArguments(event);
|
||||||
logger.debug("Executing command with argument '{}'.", arg);
|
logger.debug("Executing command with argument '{}'.", arg);
|
Loading…
Reference in New Issue
Block a user