optionalNullable

open fun optionalNullable(default: Output? = null): OptionalArg<Input, Output, Output?>

Make this argument optional and fall back to the default value if the conversion fails.

Parameters

default

A default value matching the expected type - can also be null.


open fun optionalNullable(default: suspend (DiscordContext) -> Output?): OptionalArg<Input, Output, Output?>

Make this argument optional and fall back to the default value if the conversion fails. Exposes a CommandEvent.

Parameters

default

A default value matching the expected type - can also be null.