Interface Command
- All Known Implementing Classes:
AnnotatedCommand
public interface Command
Represents a bot command.
-
Method Summary
Modifier and Type Method Description Set<String>getAliases()Gets the aliases for this command.CommandDocumentationgetDocumentation()Gets the documentation of the command.default PermissionLevelgetMinimumPermissionLevel()Gets the permission level required to use the command.default StringgetRequiredPermission()Gets the name of the permission required to use the command.default ScopegetScope()Gets the scope of this command.reactor.core.publisher.Mono<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
Gets the aliases for this command.- Returns:
- the set of aliases
-
getDocumentation
CommandDocumentation getDocumentation()Gets the documentation of the command.- Returns:
- the documentation
-
getRequiredPermission
Gets the name of the permission required to use the command.- Returns:
- the required permission. Empty string means no requirement
-
getMinimumPermissionLevel
Gets the permission level required to use the command.- Returns:
- the required permission level
-
getScope
Gets the scope of this command.- Returns:
- the scope
-