TopLevelSlashCommandInfo

Represents a top-level slash command (i.e. not a subcommand, nor a group).

Contains additional info only available on top-level commands.

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
open override val guildId: Long?

The ID of the guild on which this command was pushed on.

Link copied to clipboard
open override val id: Long

The ID of this application command, this is a snowflake that contains the time at which the command was created.

Link copied to clipboard
abstract val isDefaultLocked: Boolean

Whether this application command is (initially) locked to administrators.

Link copied to clipboard
abstract val isGuildOnly: Boolean

Whether this application command is usable only in guilds (i.e., no DMs).

Link copied to clipboard

Whether this slash command is top-level only.

Link copied to clipboard

Discord's metadata about this application command.

Link copied to clipboard
abstract val name: String

The name of this command.

Link copied to clipboard
abstract val nsfw: Boolean

Whether this application commands is usable only in NSFW channels.

Link copied to clipboard

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
abstract val scope: CommandScope

The scope on which this application command is pushed on.

Link copied to clipboard

Subcommand groups of this top-level slash command, the key is the name of the subcommand group.

Link copied to clipboard

Subcommands of this top-level slash command, the key is the name of the subcommand.

Link copied to clipboard
open override val timeModified: OffsetDateTime

The time at which this application command was created/modified, retrieved from the version.

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.

Link copied to clipboard
open override val version: Long

The version of this application command, this is a snowflake that contains the time at which the command was created/updated.

Functions

Link copied to clipboard
@Nonnull
open fun getId(): String
Link copied to clipboard
open override fun getIdLong(): Long
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
abstract fun getParameter(declaredName: String): AggregatedParameter?

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
@Nonnull
open fun getTimeCreated(): OffsetDateTime
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.

Link copied to clipboard

Retrieves the IntegrationPrivileges for this application command.