CommandsAPI

open class CommandsAPI

Constructors

Link copied to clipboard
constructor(plugin: String)
Create a CommandsAPI for the specified plugin

Types

Link copied to clipboard
open class CommandResult
Command result

Functions

Link copied to clipboard
open fun generateId(): Long
Generate a fake Snowflake
Link copied to clipboard
Generate a fake Snowflake String
Link copied to clipboard
open fun registerCommand(@NonNull name: String, @NonNull description: String, @NonNull execute: (CommandContext) -> CommandsAPI.CommandResult)
open fun registerCommand(@NonNull name: String, @NonNull description: String, @NonNull option: ApplicationCommandOption, @NonNull execute: (CommandContext) -> CommandsAPI.CommandResult)
open fun registerCommand(@NonNull name: String, @NonNull description: String, @NonNull options: List<ApplicationCommandOption>, @NonNull execute: (CommandContext) -> CommandsAPI.CommandResult)
Registers a slash command.
Link copied to clipboard
open fun unregisterAll()
Unregisters all commands
Link copied to clipboard
open fun unregisterCommand(name: String)
Unregisters a command.

Properties

Link copied to clipboard
ID of the Aliucord Application
Link copied to clipboard
val aliucordApplication: Application
Link copied to clipboard
open var commands: Map<String, RemoteApplicationCommand>
List of all registered commands
Link copied to clipboard
Mapping of all registered commands to the plugin that registered them
Link copied to clipboard
val DONT_SEND_RESULT: String = "{ALIUCORD_COMMAND}"
Link copied to clipboard
open var interactionsStore: Map<Long, WidgetApplicationCommandBottomSheetViewModel.StoreState>
InteractionsStore
Link copied to clipboard
open var messageOption: ApplicationCommandOption
Optional CommandOption of type String
Link copied to clipboard
Command List of the plugin associated with this CommandsAPI
Link copied to clipboard
Name of the plugin associated with this CommandsAPI
Link copied to clipboard
open var requiredMessageOption: ApplicationCommandOption
Required CommandOption of type String