-
- All Known Implementing Classes:
AnnotatedCommand
public interface Command
Represents a bot command.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<String>
getAliases()
Gets the aliases for this command.CommandDocumentation
getDocumentation(Locale locale)
Gets the documentation of the command.default PermissionLevel
getMinimumPermissionLevel()
Gets the permission level required to use the command.default String
getRequiredPermission()
Gets the name of the permission required to use the command.default Scope
getScope()
Gets the scope of this command.reactor.core.publisher.Mono<Void>
run(Context ctx)
Defines the action of the command
-
-
-
Method Detail
-
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.
-
getDocumentation
CommandDocumentation getDocumentation(Locale locale)
Gets the documentation of the command.- Parameters:
locale
- the locale indicating the language of the documentation- 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
-
-