optional

open fun optional(default: Output): 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.


open fun optional(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.