Interface ApplicationCommandDefinition


@Experimental public interface ApplicationCommandDefinition
Represents an application command that can be tested against incoming interactions and to build a response sequence.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the actual component responsible for maintaining interaction responses.
    boolean
    test(discord4j.discordjson.json.ApplicationCommandInteractionData acid)
    Match whether the incoming interaction can be handled by this command.
  • Method Details

    • test

      boolean test(discord4j.discordjson.json.ApplicationCommandInteractionData acid)
      Match whether the incoming interaction can be handled by this command.
      Parameters:
      acid - the incoming interaction data
      Returns:
      true if this command can handle this interaction, false otherwise
    • createResponseHandler

      InteractionHandler createResponseHandler(RestInteraction interaction)
      Return the actual component responsible for maintaining interaction responses.
      Parameters:
      interaction - the interaction this command is handling
      Returns:
      a source for responses around the given interaction