Package io.facet.commands

Types

ApplicationCommand
Link copied to clipboard
interface ApplicationCommand<in C : ApplicationCommandContext>

A discord application command.

ApplicationCommandBuilder
Link copied to clipboard
open class ApplicationCommandBuilder
ApplicationCommandContext
Link copied to clipboard
sealed class ApplicationCommandContext : CoroutineScope

The context for an interaction with an application command.

GlobalApplicationCommand
Link copied to clipboard
GlobalCommandContext
Link copied to clipboard
interface GlobalCommandContext
GlobalGuildMessageCommand
Link copied to clipboard

An application command that is available globally, but can only be used from within a guild.

GlobalGuildSlashCommand
Link copied to clipboard

An application command that is available globally, but can only be used from within a guild.

GlobalGuildUserCommand
Link copied to clipboard

An application command that is available globally, but can only be used from within a guild.

GlobalMessageCommand
Link copied to clipboard

An application command that is available globally.

GlobalMessageCommandContext
Link copied to clipboard

The context for an interaction with an ApplicationCommand that could have been used in a DM.

GlobalSlashCommand
Link copied to clipboard

An application command that is available globally.

GlobalSlashCommandContext
Link copied to clipboard

The context for an interaction with an ApplicationCommand that could have been used in a DM.

GlobalUserCommand
Link copied to clipboard

An application command that is available globally.

GlobalUserCommandContext
Link copied to clipboard

The context for an interaction with an ApplicationCommand that could have been used in a DM.

GuildApplicationCommand
Link copied to clipboard
GuildCommandContext
Link copied to clipboard
interface GuildCommandContext
GuildMessageCommand
Link copied to clipboard

An application command that is only available within a specific guild.

GuildMessageCommandContext
Link copied to clipboard

The context for an interaction with an ApplicationCommand that occurred in a server.

GuildSlashCommand
Link copied to clipboard

An application command that is only available within a specific guild.

GuildSlashCommandContext
Link copied to clipboard

The context for an interaction with an ApplicationCommand that occurred in a server.

GuildUserCommand
Link copied to clipboard

An application command that is only available within a specific guild.

GuildUserCommandContext
Link copied to clipboard

The context for an interaction with an ApplicationCommand that occurred in a server.

InteractionOptions
Link copied to clipboard
class InteractionOptions(commandInteraction: ApplicationCommandInteraction)

An experimental class for getting command options through property delegation.

MessageCommand
Link copied to clipboard
interface MessageCommand<in C : MessageCommandContext> : ApplicationCommand<C>
MessageCommandContext
Link copied to clipboard
sealed class MessageCommandContext : ApplicationCommandContext
OptionBuilder
Link copied to clipboard
class OptionBuilder : ApplicationCommandBuilder
PermissibleApplicationCommand
Link copied to clipboard
interface PermissibleApplicationCommand

A command that is restricted using the implemented hasPermission function.

SlashCommand
Link copied to clipboard
interface SlashCommand<in C : SlashCommandContext> : ApplicationCommand<C>
SlashCommandContext
Link copied to clipboard
sealed class SlashCommandContext : ApplicationCommandContext
UserCommand
Link copied to clipboard
interface UserCommand<in C : UserCommandContext> : ApplicationCommand<C>
UserCommandContext
Link copied to clipboard
sealed class UserCommandContext : ApplicationCommandContext

Functions

acknowledge
Link copied to clipboard
suspend fun ApplicationCommandContext.acknowledge(ephemeral: Boolean = false)

Acknowledges the interaction indicating a response will be edited later. The user sees a loading state, visible to all participants in the invoking channel. For a "only you can see this" response, set ephemeral to true, or use acknowledgeEphemeral().

acknowledgeEphemeral
Link copied to clipboard
suspend fun ApplicationCommandContext.acknowledgeEphemeral()

Acknowledges the interaction indicating a response will be edited later. Only the invoking user sees a loading state.

applicationCommandRequest
Link copied to clipboard

DSL for building ApplicationCommandRequest for message commands

fun UserCommand<*>.applicationCommandRequest(name: String): ApplicationCommandRequest

DSL for building ApplicationCommandRequest for user commands

fun applicationCommandRequest(name: String, desc: String, block: ApplicationCommandBuilder.() -> Unit = {}): ApplicationCommandRequest
fun SlashCommand<*>.applicationCommandRequest(name: String, desc: String, block: ApplicationCommandBuilder.() -> Unit = {}): ApplicationCommandRequest

DSL for building ApplicationCommandRequest for slash commands

deferReply
Link copied to clipboard
suspend fun ApplicationCommandContext.deferReply(ephemeral: Boolean = false)

Acknowledges the interaction indicating a response will be edited later. The user sees a loading state, visible to all participants in the invoking channel. For a "only you can see this" response, set ephemeral to true.