Class CommandContext

java.lang.Object
kboyle.oktane.core.CommandContext
Direct Known Subclasses:
BenchmarkContext, DiscordCommandContext, ExampleCommandContext

public class CommandContext extends Object
Represents a POJO that will be used for passing state in commands.
  • Constructor Details

    • CommandContext

      public CommandContext(BeanProvider beanProvider)
    • CommandContext

      public CommandContext()
  • Method Details

    • beanProvider

      public BeanProvider beanProvider()
      Returns:
      Gets the BeanProvider passed in.
    • command

      public Command command()
      Returns:
      Gets current Command being executed, this will be null outside of a command method.
    • input

      public String input()
      Returns:
      The input used to trigger the current execution.
    • prefix

      public Optional<Prefix> prefix()
      Returns:
      The prefix used for the current execution.
    • currentArgument

      public Object currentArgument()
      Returns:
      The current argument having preconditions run against it.
    • currentParameter

      public CommandParameter currentParameter()
      Returns:
      The current parameter having preconditions run against it.