publicSubCommand

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

DSL function for easily registering a public 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 = "publicSubCommand1")
suspend fun <M : ModalForm> SlashCommand<*, *, *>.publicSubCommand(modal: () -> M, body: suspend PublicSlashCommand<Arguments, M>.() -> Unit): PublicSlashCommand<Arguments, M>

DSL function for easily registering a public 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<*, *, *>.publicSubCommand(arguments: () -> A, modal: () -> M, body: suspend PublicSlashCommand<A, M>.() -> Unit): PublicSlashCommand<A, M>

DSL function for easily registering a public subcommand, with arguments and 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 public slash command object, for subcommands.

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

Parameters

commandObj

PublicSlashCommand object to register as a subcommand.


DSL function for easily registering a public 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.


@JvmName(name = "publicSubCommand1")
suspend fun <M : ModalForm> SlashGroup.publicSubCommand(modal: () -> M, body: suspend PublicSlashCommand<Arguments, M>.() -> Unit): PublicSlashCommand<Arguments, M>

DSL function for easily registering a public 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.


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

DSL function for easily registering a public 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.