getGeneratedValueSupplier

open fun getGeneratedValueSupplier(guild: Guild?, commandId: String?, commandPath: CommandPath, optionName: String, parameterType: ParameterType): ApplicationGeneratedValueSupplier(source)

Returns the generated value supplier of a @GeneratedOption.

This function will only be called once per command option per guild.

Return

A ApplicationGeneratedValueSupplier to generate the option on command execution

Parameters

guild

The Guild in which to add the default value, null if the scope is not CommandScope.GUILD

commandId

The ID of the command, as optionally set in @CommandId, might be null

commandPath

The path of the command, as set in @JDASlashCommand

optionName

The option name, not the same as the parameter name, this is the same name that appears on Discord

parameterType

The boxed type of the command option