Class AnnotatedCommand

java.lang.Object
com.github.alex1304.ultimategdbot.api.command.annotated.AnnotatedCommand
All Implemented Interfaces:
Command

public class AnnotatedCommand
extends java.lang.Object
implements Command
Command implemented via annotations.
  • Method Summary

    Modifier and Type Method Description
    java.util.Set<java.lang.String> getAliases()
    Gets the aliases for this command.
    CommandDocumentation getDocumentation()
    Gets the documentation of the command.
    PermissionLevel getPermissionLevel()
    Gets the permission level required to execute this command.
    Scope getScope()
    Gets the type of channels this command is allowed for use in.
    reactor.core.publisher.Mono<java.lang.Void> run​(Context ctx)
    Defines the action of the command
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • run

      public reactor.core.publisher.Mono<java.lang.Void> run​(Context ctx)
      Description copied from interface: Command
      Defines the action of the command
      Specified by:
      run in interface 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

      public java.util.Set<java.lang.String> getAliases()
      Description copied from interface: Command
      Gets the aliases for this command.
      Specified by:
      getAliases in interface Command
      Returns:
      the set of aliases
    • getDocumentation

      public CommandDocumentation getDocumentation()
      Description copied from interface: Command
      Gets the documentation of the command.
      Specified by:
      getDocumentation in interface Command
      Returns:
      the documentation
    • getPermissionLevel

      public PermissionLevel getPermissionLevel()
      Description copied from interface: Command
      Gets the permission level required to execute this command.
      Specified by:
      getPermissionLevel in interface Command
      Returns:
      the permission level
    • getScope

      public Scope getScope()
      Description copied from interface: Command
      Gets the type of channels this command is allowed for use in.
      Specified by:
      getScope in interface Command
      Returns:
      the set of allowed type of channels
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object