Interface SlashCommand
- All Superinterfaces:
ICommand
A
SlashCommand
is represented by a slash ('/').
They can have displayed subcommands and more options.-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) This code block will be executed on the command execution.default net.dv8tion.jda.api.interactions.commands.build.CommandData
Gets the commandCommandData
.Gets the command description.
-
Method Details
-
getDescription
String getDescription()Gets the command description.- Returns:
- the command description
-
execute
void execute(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) This code block will be executed on the command execution.- Parameters:
event
- Event given by the Discord API
-
getCommandData
default net.dv8tion.jda.api.interactions.commands.build.CommandData getCommandData()Gets the commandCommandData
. This can contain subcommands, options, and more things.- Returns:
- the given
CommandData
(empty by default)
-