ephemeralSubCommand

suspend fun <T : Arguments> SlashCommand<*, *, *>.ephemeralSubCommand(arguments: () -> T, body: suspend EphemeralSlashCommand<T, ModalForm>.() -> Unit): EphemeralSlashCommand<T, ModalForm>
suspend fun <T : Arguments> SlashGroup.ephemeralSubCommand(arguments: () -> T, body: suspend EphemeralSlashCommand<T, ModalForm>.() -> Unit): EphemeralSlashCommand<T, ModalForm>

DSL function for easily registering an ephemeral subcommand, with arguments.

Use this in your setup function to register a subcommand that may be executed on Discord.

Parameters

arguments

Arguments builder (probably a reference to the class constructor).

body

Builder lambda used for setting up the slash command object.


@JvmName(name = "ephemeralSubCommand1")
suspend fun <M : ModalForm> SlashCommand<*, *, *>.ephemeralSubCommand(modal: () -> M, body: suspend EphemeralSlashCommand<Arguments, M>.() -> Unit): EphemeralSlashCommand<Arguments, M>

DSL function for easily registering an ephemeral subcommand, with a modal form.

Use this in your setup function to register a subcommand that may be executed on Discord.

Parameters

modal

ModalForm builder (probably a reference to the class constructor).

body

Builder lambda used for setting up the slash command object.


suspend fun <A : Arguments, M : ModalForm> SlashCommand<*, *, *>.ephemeralSubCommand(arguments: () -> A, modal: () -> M, body: suspend EphemeralSlashCommand<A, M>.() -> Unit): EphemeralSlashCommand<A, M>

DSL function for easily registering an ephemeral subcommand, with a modal form.

Use this in your setup function to register a subcommand that may be executed on Discord.

Parameters

arguments

Arguments builder (probably a reference to the class constructor).

modal

ModalForm builder (probably a reference to the class constructor).

body

Builder lambda used for setting up the slash command object.


Function for registering a custom ephemeral slash command object, for subcommands.

You can use this if you have a custom ephemeral slash command subclass you need to register.

Parameters

commandObj

EphemeralSlashCommand object to register as a subcommand.


DSL function for easily registering an ephemeral subcommand, without arguments.

Use this in your slash command function to register a subcommand that may be executed on Discord.

Parameters

body

Builder lambda used for setting up the subcommand object.


suspend fun <T : Arguments, M : ModalForm> SlashGroup.ephemeralSubCommand(arguments: () -> T, modal: () -> M, body: suspend EphemeralSlashCommand<T, M>.() -> Unit): EphemeralSlashCommand<T, M>

DSL function for easily registering an ephemeral subcommand, with arguments.

Use this in your setup function to register a subcommand that may be executed on Discord.

Parameters

arguments

Arguments builder (probably a reference to the class constructor).

modal

ModalForm builder (probably a reference to the class constructor).

body

Builder lambda used for setting up the slash command object.


@JvmName(name = "ephemeralSubCommand1")
suspend fun <M : ModalForm> SlashGroup.ephemeralSubCommand(modal: () -> M, body: suspend EphemeralSlashCommand<Arguments, M>.() -> Unit): EphemeralSlashCommand<Arguments, M>

DSL function for easily registering an ephemeral subcommand, with a modal.

Use this in your setup function to register a subcommand that may be executed on Discord.

Parameters

modal

ModalForm builder (probably a reference to the class constructor).

body

Builder lambda used for setting up the slash command object.