Interface SlashCommandCreateEvent
-
- All Superinterfaces:
ApplicationCommandEvent,Event
public interface SlashCommandCreateEvent extends ApplicationCommandEvent
A slash command create event.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default SlashCommandInteractiongetSlashCommandInteraction()Gets the created interaction as SlashCommandInteraction, if the interaction is of this type.default java.util.Optional<SlashCommandInteraction>getSlashCommandInteractionWithCommandId(long commandId)Gets the created interaction as SlashCommandInteraction, if the interaction is of this type and the command id equals the given command id.-
Methods inherited from interface org.javacord.api.event.interaction.ApplicationCommandEvent
getInteraction
-
-
-
-
Method Detail
-
getSlashCommandInteraction
default SlashCommandInteraction getSlashCommandInteraction()
Gets the created interaction as SlashCommandInteraction, if the interaction is of this type.- Returns:
- The interaction.
-
getSlashCommandInteractionWithCommandId
default java.util.Optional<SlashCommandInteraction> getSlashCommandInteractionWithCommandId(long commandId)
Gets the created interaction as SlashCommandInteraction, if the interaction is of this type and the command id equals the given command id.- Parameters:
commandId- The command it to match.- Returns:
- The interaction.
-
-