Class _SlashCommandsKt

    • Constructor Detail

    • Method Detail

      • unsafeSubCommand

         final static <T extends Arguments> UnsafeSlashCommand<T, ModalForm> unsafeSubCommand(SlashCommand<?, ?, ?> $self, Function0<T> arguments, SuspendFunction1<UnsafeSlashCommand<T, ModalForm>, Unit> body)

        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.
      • unsafeSubCommand

         final static <T extends Arguments, M extends ModalForm> UnsafeSlashCommand<T, M> unsafeSubCommand(SlashCommand<?, ?, ?> $self, UnsafeSlashCommand<T, M> commandObj)

        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.
      • unsafeSubCommand

         final static UnsafeSlashCommand<Arguments, ModalForm> unsafeSubCommand(SlashCommand<?, ?, ?> $self, SuspendFunction1<UnsafeSlashCommand<Arguments, ModalForm>, Unit> body)

        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.
      • unsafeSubCommand

         final static <T extends Arguments> UnsafeSlashCommand<T, ModalForm> unsafeSubCommand(SlashGroup $self, Function0<T> arguments, SuspendFunction1<UnsafeSlashCommand<T, ModalForm>, Unit> body)

        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.
      • unsafeSubCommand

         final static <T extends Arguments, M extends ModalForm> UnsafeSlashCommand<T, M> unsafeSubCommand(SlashGroup $self, UnsafeSlashCommand<T, M> commandObj)

        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.
      • unsafeSubCommand

         final static UnsafeSlashCommand<Arguments, ModalForm> unsafeSubCommand(SlashGroup $self, SuspendFunction1<UnsafeSlashCommand<Arguments, ModalForm>, Unit> body)

        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.