- Type Parameters:
T- The type of argument that is provided.
- All Superinterfaces:
ArgumentParser<Snowflake,,T> BiFunction<CommandContext,,Snowflake, Mono<T>> InputParser<Snowflake,,T> ParserFunction<Snowflake,T>
public non-sealed interface SnowflakeParser<T extends @NonNull Object>
extends InputParser<Snowflake,T>
Parses snowflake-based input arguments.
Note that no validation is performed on the raw value received ahead of time. The only benefit offered is that, for hybrid commands (text and slash) that need only a plain ID (instead of a proper entity object), this type can appear in the slash command as a proper type (user/role/channel) while avoiding the need to fetch the entity separately in the text command, losing only the validation.
- Since:
- 1.0
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
ParserFunction.PostParser<R extends @NonNull Object,I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull ParserFunction<R, I>, P2 extends @NonNull ParserFunction<I, T>> -
Method Summary
Methods inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ArgumentParser
parse, parseArgument, validateRawMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
apply, then
-
Method Details
-
type
The ID type accepted.As no validation is performed, this only affects how the parameter is registered in a slash command. It has no functional difference for the handler.
- Returns:
- The ID type.
-