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
    • getPermissionLevel

      default PermissionLevel getPermissionLevel()
      Gets the permission level required to execute this command.
      Returns:
      the permission level
    • getScope

      default Scope getScope()
      Gets the type of channels this command is allowed for use in.
      Returns:
      the set of allowed type of channels