ClaptrapBot/src/main/java/net/Broken/SlashCommand.java

40 lines
885 B
Java
Raw Normal View History

2022-05-13 17:54:56 +02:00
package net.Broken;
import net.dv8tion.jda.api.events.interaction.SlashCommandEvent;
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
2022-05-14 19:26:08 +02:00
import net.dv8tion.jda.api.interactions.commands.build.SubcommandData;
2022-05-13 17:54:56 +02:00
import java.util.List;
/**
* Interface that define command structure.
*/
public interface SlashCommand {
/**
* Main action of command
* @param args Command args.
* @param event Command MessageReceivedEvent
*/
void action(SlashCommandEvent event);
String getDescription();
List<OptionData> getOptions();
2022-05-14 19:26:08 +02:00
List<SubcommandData> getSubcommands();
2022-05-13 17:54:56 +02:00
/**
* Determines if the command is usable only by bot level admin user
* @return boolean
*/
boolean isBotAdminCmd();
/**
* Determines if the command is only usable on NSFW channels
* @return boolean
*/
boolean isNSFW();
}