registerCommand

open fun registerCommand(@NonNull name: String, @NonNull description: String, @NonNull options: List<ApplicationCommandOption>, @NonNull execute: (CommandContext) -> CommandsAPI.CommandResult)

Registers a slash command.

Parameters

name

Name of the command.

description

Description of the command.

options

Arguments for the command. see ApplicationCommandOption

execute

Callback for the command.


open fun registerCommand(@NonNull name: String, @NonNull description: String, @NonNull option: ApplicationCommandOption, @NonNull execute: (CommandContext) -> CommandsAPI.CommandResult)

Registers a slash command.

Parameters

name

Name of the command.

description

Description of the command.

option

Argument for the command. see ApplicationCommandOption

execute

Callback for the command.


open fun registerCommand(@NonNull name: String, @NonNull description: String, @NonNull execute: (CommandContext) -> CommandsAPI.CommandResult)

Registers a slash command.

Parameters

name

Name of the command.

description

Description of the command.

execute

Callback for the command.