SlashSubcommandInfo

Represents a slash subcommand, either in a top-level command, or a subcommand group.

Properties

Link copied to clipboard
open val asMention: String

Mention for this slash command.

Link copied to clipboard

The permissions required for the bot to run this command.

Link copied to clipboard
abstract val context: BContext

The main context.

Link copied to clipboard

Purely for debugging purposes, will be shown in exceptions.

Link copied to clipboard
abstract val description: String

The description of this slash command.

Link copied to clipboard

All options representing a Discord input.

Link copied to clipboard

Returns the full command name of this application command, separate with spaces.

Link copied to clipboard
abstract val function: KFunction<*>

The target function of this executable.

Link copied to clipboard
abstract val name: String

The name of this command.

Link copied to clipboard
abstract override val parameters: List<SlashCommandParameter>

The parameters of this executable.

Link copied to clipboard

The parent of this command, null for top-level commands.

Link copied to clipboard
abstract val path: CommandPath

The complete path that leads to this command.

Link copied to clipboard

Retrieves the top-level command owning this application command.

Link copied to clipboard

The permissions required for the caller to use this command.

Functions

Link copied to clipboard

Returns the option with the supplied declared name (i.e., name of the method parameter), or null if not found.

Link copied to clipboard

Returns the option with the supplied display name (i.e., the name you see on Discord), or null if not found.

Link copied to clipboard
open override fun getParameter(declaredName: String): SlashCommandParameter?

Returns the aggregated parameter with the supplied declared name (i.e., name of the method parameter), or null if not found.

Link copied to clipboard
abstract fun getUsability(inputUser: InputUser, channel: MessageChannel): Usability

Returns a Usability instance, representing whether this application command can be used.

Link copied to clipboard
abstract fun hasFilters(): Boolean

Return true if this has a one or more filters.

Link copied to clipboard
abstract fun hasRateLimiter(): Boolean

Return true if this has a rate limiter.