Class _CommandsKt
-
- All Implemented Interfaces:
public final class _CommandsKt
-
-
Method Summary
Modifier and Type Method Description final static UnsafeMessageCommand<ModalForm>unsafeMessageCommand(Extension $self, SuspendFunction1<UnsafeMessageCommand<ModalForm>, Unit> body)Register an unsafe message command, DSL-style. final static <M extends ModalForm> UnsafeMessageCommand<M>unsafeMessageCommand(Extension $self, UnsafeMessageCommand<M> commandObj)Register a custom instance of an unsafe message command. final static <T extends Arguments> UnsafeSlashCommand<T, ModalForm>unsafeSlashCommand(Extension $self, Function0<T> arguments, SuspendFunction1<UnsafeSlashCommand<T, ModalForm>, Unit> body)DSL function for easily registering an unsafe slash command, with arguments. final static <T extends Arguments, M extends ModalForm> UnsafeSlashCommand<T, M>unsafeSlashCommand(Extension $self, UnsafeSlashCommand<T, M> commandObj)Function for registering a custom unsafe slash command object. final static UnsafeSlashCommand<Arguments, ModalForm>unsafeSlashCommand(Extension $self, SuspendFunction1<UnsafeSlashCommand<Arguments, ModalForm>, Unit> body)DSL function for easily registering an unsafe slash command, without arguments. final static UnsafeUserCommand<ModalForm>unsafeUserCommand(Extension $self, SuspendFunction1<UnsafeUserCommand<ModalForm>, Unit> body)Register an unsafe user command, DSL-style. final static <M extends ModalForm> UnsafeUserCommand<M>unsafeUserCommand(Extension $self, UnsafeUserCommand<M> commandObj)Register a custom instance of an unsafe user command. -
-
Method Detail
-
unsafeMessageCommand
final static UnsafeMessageCommand<ModalForm> unsafeMessageCommand(Extension $self, SuspendFunction1<UnsafeMessageCommand<ModalForm>, Unit> body)
Register an unsafe message command, DSL-style.
-
unsafeMessageCommand
final static <M extends ModalForm> UnsafeMessageCommand<M> unsafeMessageCommand(Extension $self, UnsafeMessageCommand<M> commandObj)
Register a custom instance of an unsafe message command.
-
unsafeSlashCommand
final static <T extends Arguments> UnsafeSlashCommand<T, ModalForm> unsafeSlashCommand(Extension $self, Function0<T> arguments, SuspendFunction1<UnsafeSlashCommand<T, ModalForm>, Unit> body)
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.
-
unsafeSlashCommand
final static <T extends Arguments, M extends ModalForm> UnsafeSlashCommand<T, M> unsafeSlashCommand(Extension $self, UnsafeSlashCommand<T, M> commandObj)
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.
-
unsafeSlashCommand
final static UnsafeSlashCommand<Arguments, ModalForm> unsafeSlashCommand(Extension $self, SuspendFunction1<UnsafeSlashCommand<Arguments, ModalForm>, Unit> body)
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.
-
unsafeUserCommand
final static UnsafeUserCommand<ModalForm> unsafeUserCommand(Extension $self, SuspendFunction1<UnsafeUserCommand<ModalForm>, Unit> body)
Register an unsafe user command, DSL-style.
-
unsafeUserCommand
final static <M extends ModalForm> UnsafeUserCommand<M> unsafeUserCommand(Extension $self, UnsafeUserCommand<M> commandObj)
Register a custom instance of an unsafe user command.
-
-
-
-