unsafeSlashCommand
suspend fun <T : Arguments> Extension.unsafeSlashCommand(arguments: () -> T, body: suspend UnsafeSlashCommand<T, UnsafeModalForm>.() -> Unit): UnsafeSlashCommand<T, UnsafeModalForm>
DSL function for easily registering an unsafe slash command, with arguments.
Use this in your setup function to register a slash command 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.
suspend fun <T : Arguments, M : UnsafeModalForm> Extension.unsafeSlashCommand(commandObj: UnsafeSlashCommand<T, M>): UnsafeSlashCommand<T, M>
Function for registering a custom unsafe slash command object.
You can use this if you have a custom unsafe slash command subclass you need to register.
Parameters
commandObj
UnsafeSlashCommand object to register.
suspend fun Extension.unsafeSlashCommand(body: suspend UnsafeSlashCommand<Arguments, UnsafeModalForm>.() -> Unit): UnsafeSlashCommand<Arguments, UnsafeModalForm>
DSL function for easily registering an unsafe slash command, without arguments.
Use this in your setup function to register a slash command that may be executed on Discord.
Parameters
body
Builder lambda used for setting up the slash command object.