ApplicationCommandsContext

@InterfacedService(acceptMultiple = false)
interface ApplicationCommandsContext(source)

Helps to get application commands of a specific scope, find application commands with their name and update commands.

Functions

Link copied to clipboard
abstract fun findMessageCommand(guild: Guild?, name: String): MessageCommandInfo?

Returns the MessageCommandInfo with the specified name, if it is published in that scope, either in the guild, or globally.

Link copied to clipboard
abstract fun findSlashCommand(guild: Guild?, path: CommandPath): SlashCommandInfo?

Returns the SlashCommandInfo with the specified path, if it is published in that scope, either in the guild, or globally.

Link copied to clipboard
abstract fun findUserCommand(guild: Guild?, name: String): UserCommandInfo?

Returns the UserCommandInfo with the specified name, if it is published in that scope, either in the guild, or globally.

Link copied to clipboard
abstract fun <T : ApplicationCommandInfo> getApplicationCommandById(type: Class<T>, commandId: Long, group: String?, subcommand: String?): T?

Returns the application command with the specific type, id, group and subcommand, or null if one of the expected arguments does not match.

Link copied to clipboard

Returns the application command with the specific type, id, group and subcommand, or null if one of the expected arguments does not match.

Link copied to clipboard

Returns the application commands currently pushed in the specified guild's scope.

Link copied to clipboard

Returns the effective list of application commands this guild has access to.

Link copied to clipboard
abstract fun invalidateAutocompleteCache(autocompleteHandlerName: String)
abstract fun invalidateAutocompleteCache(autocompleteHandler: KFunction<Collection<Any>>)

Invalidates the autocomplete cache of the specified autocomplete handler.

Link copied to clipboard

Updates the application commands for the global scope.

Link copied to clipboard

Updates the application commands in the specified guild.