Interface ISlashCommand
public interface ISlashCommand
-
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.commands.build.CommandData
Builds CommandData for the SlashCommand upsert.getName()
Gets the name for the Command.void
onAutoComplete
(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event) This body is executed when an auto-complete event is received.void
run
(SlashCommandEvent event) Runs checks for theSlashCommand
with the givenSlashCommandEvent
that called it.
-
Method Details
-
run
Runs checks for theSlashCommand
with the givenSlashCommandEvent
that called it.
Will terminate, and possibly respond with a failure message, if any checks fail.- Parameters:
event
- The SlashCommandEvent that triggered this Command
-
onAutoComplete
void onAutoComplete(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event) This body is executed when an auto-complete event is received. This only ever gets executed if an auto-complete option is set.- Parameters:
event
- The event to handle.- See Also:
-
OptionData.setAutoComplete(boolean)
-
buildCommandData
net.dv8tion.jda.api.interactions.commands.build.CommandData buildCommandData()Builds CommandData for the SlashCommand upsert. This code is executed when we need to upsert the command.- Returns:
- the built command data
-
getName
String getName()Gets the name for the Command.- Returns:
- The name for the Command
-