Interface SlashCommandCreateEvent

  • All Superinterfaces:
    Event


    public interface SlashCommandCreateEvent
    extends Event
    An slash command create event.
    • Method Detail

      • getInteraction

        Interaction getInteraction​()
        Gets the created interaction.
        Returns:
        The interaction.
      • getSlashCommandInteraction

        default SlashCommandInteraction getSlashCommandInteraction​()
        Gets the created interaction as SlashCommandInteraction, if the interaction is of this type.
        Returns:
        The interaction.
      • getSlashCommandInteractionWithCommandId

        default 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.