Interface Command
- All Known Implementing Classes:
AnnotatedCommand
public interface Command
Represents a bot command.
-
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.default PermissionLevel
getPermissionLevel()
Gets the permission level required to execute this command.default 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
-
Method Details
-
run
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
java.util.Set<java.lang.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
Gets the permission level required to execute this command.- Returns:
- the permission level
-
getScope
Gets the type of channels this command is allowed for use in.- Returns:
- the set of allowed type of channels
-