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
|
2022-05-15 18:39:46 +02:00
|
|
|
*
|
|
|
|
* @param args Command args.
|
2022-05-13 17:54:56 +02:00
|
|
|
* @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
|
2022-05-15 18:39:46 +02:00
|
|
|
*
|
2022-05-13 17:54:56 +02:00
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
boolean isBotAdminCmd();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determines if the command is only usable on NSFW channels
|
2022-05-15 18:39:46 +02:00
|
|
|
*
|
2022-05-13 17:54:56 +02:00
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
boolean isNSFW();
|
|
|
|
|
|
|
|
|
|
|
|
}
|