Interface Command

All Known Implementing Classes:
AnnotatedCommand

public interface Command
Represents a bot command.
  • Method Details

    • run

      reactor.core.publisher.Mono<Void> run​(Context ctx)
      Defines the action of the command
      Parameters:
      ctx - the context
      Returns:
      a Mono that completes empty when the command is successful, and emits an error when something goes wrong.
    • getAliases

      Set<String> getAliases()
      Gets the aliases for this command.
      Returns:
      the set of aliases
    • getDocumentation

      CommandDocumentation getDocumentation()
      Gets the documentation of the command.
      Returns:
      the documentation
    • getRequiredPermission

      default String getRequiredPermission()
      Gets the name of the permission required to use the command.
      Returns:
      the required permission. Empty string means no requirement
    • getMinimumPermissionLevel

      default PermissionLevel getMinimumPermissionLevel()
      Gets the permission level required to use the command.
      Returns:
      the required permission level
    • getScope

      default Scope getScope()
      Gets the scope of this command.
      Returns:
      the scope