Uses of Interface
dev.sympho.modular_commands.api.command.result.CommandResult
Packages that use CommandResult
Package
Description
Handler interfaces used across the system.
Interfaces defining the result of handling an invoked command.
Exceptions thrown by the system.
API for permission management.
Runtime system for executing commands defined through the API.
-
Uses of CommandResult in dev.sympho.modular_commands.api.command.handler
Methods in dev.sympho.modular_commands.api.command.handler that return types with arguments of type CommandResultModifier and TypeMethodDescriptiondefault Mono<CommandResult>
Handles an invocation of the command.default Mono<CommandResult>
InvocationHandler.handleWrapped
(C context) Handles an invocation of the command usingInvocationHandler.handle(CommandContext)
, automatically converting any exception thrown in that method or issued in the resulting mono to anexception result
(with the exception of aResultException
, which is unpacked into the contained result).Methods in dev.sympho.modular_commands.api.command.handler with parameters of type CommandResultModifier and TypeMethodDescriptionResultHandler.apply
(C context, CommandResult result) ResultHandler.handle
(C context, CommandResult result) Handles the result of a command. -
Uses of CommandResult in dev.sympho.modular_commands.api.command.result
Subinterfaces of CommandResult in dev.sympho.modular_commands.api.command.resultModifier and TypeInterfaceDescriptioninterface
The result from a command that fails to execute due to an internal error.interface
An error result due to an exception being thrown.interface
The result from a command that fails to execute due to user error.interface
Failure result due to an issue with the provided arguments.interface
A failure result with a message to the user.interface
The result from a command that ran successfully.interface
A successful result with a message to the user.Classes in dev.sympho.modular_commands.api.command.result that implement CommandResultModifier and TypeClassDescriptionfinal record
Failure result due to one or more argument being provided where one wasn't expected.final record
Failure result due to a provided argument being invalid.final record
Failure result due to a required argument not being provided.final record
A failure result due to the user having insufficient permissions.final record
A failure result due to the user not being part of a specific group.Methods in dev.sympho.modular_commands.api.command.result that return CommandResultModifier and TypeMethodDescriptionstatic CommandResult
Alias forResults.error(String)
that casts to a plain Result to avoid Generics issues.static CommandResult
Results.exceptionR
(Throwable cause) Alias forResults.exception(Throwable)
that casts to a plain Result to avoid Generics issues.static CommandResult
Results.failR()
Alias forResults.fail()
that casts to a plain Result to avoid Generics issues.static CommandResult
Alias forResults.failure(String)
that casts to a plain Result to avoid Generics issues.static CommandResult
Results.okR()
Alias forResults.ok()
that casts to a plain Result to avoid Generics issues.static CommandResult
Alias forResults.success(String)
that casts to a plain Result to avoid Generics issues.Methods in dev.sympho.modular_commands.api.command.result that return types with arguments of type CommandResultModifier and TypeMethodDescriptionstatic Mono<CommandResult>
Generates a result indicating the command encountered an error.static Mono<CommandResult>
Results.exceptionMono
(Throwable cause) Generates a result indicating the command encountered an error due to an exception.static Mono<CommandResult>
Results.failMono()
Generates a result indicating the command failed with no further context.static Mono<CommandResult>
Results.failureMono
(String message) Generates a result indicating the command failed with a message to the user.static Mono<CommandResult>
Results.okMono()
Generates a result indicating the command executed successfully with no further context.static Mono<CommandResult>
Results.successMono
(String message) Generates a result indicating the command executed successfully with a message to the user. -
Uses of CommandResult in dev.sympho.modular_commands.api.exception
Methods in dev.sympho.modular_commands.api.exception that return CommandResultConstructors in dev.sympho.modular_commands.api.exception with parameters of type CommandResult -
Uses of CommandResult in dev.sympho.modular_commands.api.permission
Methods in dev.sympho.modular_commands.api.permission that return types with arguments of type CommandResultModifier and TypeMethodDescriptiondefault Mono<CommandResult>
Determines whether the invoking user in the current execution context (guild and channel) has access equivalent to the given group, otherwise generating an appropriate result. -
Uses of CommandResult in dev.sympho.modular_commands.execute
Methods in dev.sympho.modular_commands.execute that return types with arguments of type CommandResultModifier and TypeMethodDescriptionLazyContext.load()
Loads remaining internal state, making the context fully ready for use.InvocationValidator.validateAccess
(AccessValidator validator, List<? extends Command<?>> chain) Validates that the user that invoked a command has sufficient access to do so.InvocationValidator.validateSettings
(E event, List<? extends Command<?>> chain) Validates that a command invocation is appropriate as per the command's settings.