io.github.chikyukido.nyaapplet.commands.NyaMainCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of NyaApplet Show documentation
Show all versions of NyaApplet Show documentation
An applet that can send in anime pics from different sources.
package io.github.chikyukido.nyaapplet.commands;
import io.github.chikyukido.appletmanager.commands.SlashGroup;
import io.github.chikyukido.appletmanager.commands.SlashGroupCommand;
import io.github.chikyukido.appletmanager.commands.SlashGroupMainCommand;
import lombok.RequiredArgsConstructor;
import net.dv8tion.jda.internal.interactions.CommandDataImpl;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author Chikyu Kido
*/
@Component
@RequiredArgsConstructor
public class NyaMainCommand implements SlashGroupMainCommand {
private final NyaImageCommand nyaImageCommand;
private final NyaTypeCommand nyaTypeCommand;
@Override
public CommandDataImpl getCommandData() {
return new CommandDataImpl("nya", "get anime image")
.addSubcommands(nyaImageCommand.getCommandData())
.addSubcommands(nyaTypeCommand.getCommandData());
}
@Override
public List usedSubCommands() {
return List.of(nyaImageCommand, nyaTypeCommand);
}
@Override
public List usedSubGroups() {
return List.of();
}
}