Interface SnowflakeParser<T extends @NonNull Object>

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
  • 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.