Interface CommandHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CommandHandler
Functional interface for handling slash-command executions.

Implement this interface to define the behavior of a registered slash command. The handler is invoked when the user executes the command in the CLI TUI.

Example Usage


 CommandHandler deployHandler = context -> {
 	System.out.println("Deploying with args: " + context.getArgs());
 	// perform deployment...
 	return CompletableFuture.completedFuture(null);
 };
 
Since:
1.0.0
See Also:
  • Method Details

    • handle

      Handles a slash-command execution.
      Parameters:
      context - the command context containing session ID, command text, and arguments
      Returns:
      a future that completes when the command handling is done