SlashCommand

Functions

Link copied to clipboard

The first option with the specified name.

open fun <T> getOption(name: String, resolver: (SlashOptionGetter) -> T): T?
open fun <T> getOption(name: String, resolver: (SlashOptionGetter) -> T, default: T): T

The option with the specified name.

Link copied to clipboard

Gets all the options with the specified name.

Link copied to clipboard

The first option with the specified type.

Link copied to clipboard
abstract fun reply(embed: Embed): Reply
abstract fun reply(content: String): Reply

Replies to an interaction.

Properties

Link copied to clipboard

The Id of the application that this interaction is for.

Link copied to clipboard
open val asIncrement: Long

The increment of this snowflake.

Link copied to clipboard
open val asProcessId: Long

The process id of this snowflake.

Link copied to clipboard
open val asTimestamp: Long

The timestamp of this snowflake. (Milliseconds since Discord Epoch, the first second of 2015 or 1420070400000.)

Link copied to clipboard
open val asWorkerId: Long

The worker id of this snowflake.

Link copied to clipboard
abstract val channel: Channel?

The channel that this interaction is for.

Link copied to clipboard
abstract val description: String

The description for CHAT_INPUT commands, 1-100 characters. Empty string for USER and MESSAGE commands.

Link copied to clipboard
abstract val guild: Guild?

The guild where the interaction occurred.

Link copied to clipboard
open val id: String

The id of this snowflake as a String.

Link copied to clipboard
abstract val idAsLong: Long

The id of this snowflake as a Long.

Link copied to clipboard

The type of this interaction.

Link copied to clipboard
abstract val isDmPermissions: Boolean?

Whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.

Link copied to clipboard
abstract val isNsfw: Boolean?

Whether the command is 'Not Safe For Work' (NSFW), only for globally-scoped commands. By default, commands are not NSFW.

Link copied to clipboard
abstract val json: JsonNode

The json representation of this entity.

Link copied to clipboard
abstract val locale: String?

The selected language of the invoking user

Link copied to clipboard
abstract val member: Member?

The member who invoked the command.

Link copied to clipboard
abstract val message: Message?

The message of this interaction.

Link copied to clipboard
abstract val name: String

The name of the command.

Link copied to clipboard

Gets all the options of the command.

Link copied to clipboard
abstract val permissions: Long?

Gets bitwise set of permissions the app or bot has within the channel the interaction was sent from

Link copied to clipboard

Gets all the subcommands of the command. (They are a type of option)

Link copied to clipboard
abstract val targetId: GetterSnowFlake?

The id of the user or message targeted by a user or message command

Link copied to clipboard
abstract val token: String

The token of this interaction.

Link copied to clipboard

Gets the triggered subcommand name.

Link copied to clipboard
open override val type: ApplicationCommandType

The type of the command.

Link copied to clipboard
abstract val user: User

The user who invoked the command.

Link copied to clipboard
abstract val version: Int

The version of this interaction.

Link copied to clipboard
abstract val yde: YDE

The main YDE instance.