Interface ResponseHandler<T>

Type Parameters:
T - The response type
All Known Implementing Classes:
ComponentResponseHandler

public interface ResponseHandler<T>
A handler for post-handling command responses (results returned from the command methods)
  • Method Details

    • handleResponse

      void handleResponse(T response, @NotNull @NotNull CommandActor actor, @NotNull @NotNull ExecutableCommand command)
      Handles the response returned from the method
      Parameters:
      response - The response returned from the method. May or may not be null.
      actor - The actor of the command
      command - The command being executed
    • reply

      static void reply(Object response, @NotNull @NotNull CommandActor actor, @NotNull @NotNull ExecutableCommand command)
      A utility method that directly replies with the response.

      This is intended to be used as a method reference: ResponseHandler::reply

      Parameters:
      response - Response to handle
      actor - The command actor
      command - The command being executed