unsafeSubCommand
suspend fun <T : Arguments> SlashCommand<*, *, *>.unsafeSubCommand(arguments: () -> T, body: suspend UnsafeSlashCommand<T, UnsafeModalForm>.() -> Unit): UnsafeSlashCommand<T, UnsafeModalForm>
suspend fun <T : Arguments> SlashGroup.unsafeSubCommand(arguments: () -> T, body: suspend UnsafeSlashCommand<T, UnsafeModalForm>.() -> Unit): UnsafeSlashCommand<T, UnsafeModalForm>
DSL function for easily registering an unsafe 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.
fun <T : Arguments, M : UnsafeModalForm> SlashCommand<*, *, *>.unsafeSubCommand(commandObj: UnsafeSlashCommand<T, M>): UnsafeSlashCommand<T, M>
fun <T : Arguments, M : UnsafeModalForm> SlashGroup.unsafeSubCommand(commandObj: UnsafeSlashCommand<T, M>): UnsafeSlashCommand<T, M>
Function for registering a custom unsafe slash command object, for subcommands.
You can use this if you have a custom unsafe slash command subclass you need to register.
Parameters
commandObj
UnsafeSlashCommand object to register as a subcommand.
suspend fun SlashCommand<*, *, *>.unsafeSubCommand(body: suspend UnsafeSlashCommand<Arguments, UnsafeModalForm>.() -> Unit): UnsafeSlashCommand<Arguments, UnsafeModalForm>
suspend fun SlashGroup.unsafeSubCommand(body: suspend UnsafeSlashCommand<Arguments, UnsafeModalForm>.() -> Unit): UnsafeSlashCommand<Arguments, UnsafeModalForm>
DSL function for easily registering an unsafe 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.