ResponseContext

The action scope of the response to an Interaction.

Types

Link copied to clipboard

Convenience class for building a message response

Properties

Link copied to clipboard
open override val botUser: User
Link copied to clipboard
open override val Message.channel: ChannelClient

Create an instance of a channel client for the Message.channelId

Link copied to clipboard
open override val client: RestClient
Link copied to clipboard

Get the interaction client from an interaction

Link copied to clipboard
val command: I

The instance of the command the interaction is for

Link copied to clipboard

The resolved data relative to the options

Link copied to clipboard
open override val Message.guild: GuildClient?

Create an instance of a guild client for the Message.channelId or null if there is no guild

Link copied to clipboard

The parameters passed from the Discord user via the command

Functions

Link copied to clipboard
suspend fun acknowledgeForFutureResponse(ephemeral: Boolean = false)

Acknowledges the interaction and informs the user and Discord that a response will be coming shortly

Link copied to clipboard
open override fun channel(channelId: String): ChannelClient

Create an instance of a channel client

Link copied to clipboard
open override fun command(applicationId: String): CommandClient

Create an instance of a command client

Link copied to clipboard
suspend fun Interaction.createModal(title: String, vararg inputs: TextInput, callback: suspend ResponseContext<ModalSubmit>.(ModalSubmit) -> Unit)

Respond to the interaction by creating a modal for the user

Link copied to clipboard
open suspend override fun Message.delete()

Deletes the message

Link copied to clipboard

Deletes the original interaction response

Link copied to clipboard
open suspend override fun Message.edit(messageEdit: MessageEdit)

Edit this message

Link copied to clipboard
open override fun global(): GlobalClient

Create an instance of the global client

Link copied to clipboard
open override fun guild(guildId: String): GuildClient

Create an instance of a guild client

Link copied to clipboard
open override fun interaction(applicationId: String, interactionToken: String): InteractionClient

Create an instance of an interaction client

Link copied to clipboard
open override fun invite(inviteCode: String): InviteClient

Create an instance of an invite client

Link copied to clipboard
open suspend override fun Message.react(emoji: String)

Add a reaction to this message.

Link copied to clipboard
open suspend override fun Message.reply(message: String): Message
open suspend override fun Message.reply(message: String, block: Embed.() -> Unit): Message

Sends a reply to an existing message using the Discord reply feature.

Link copied to clipboard
open suspend override fun Message.replyEmbed(message: String, block: Embed.() -> Unit): Message

Sends a reply to an existing message using the Discord reply feature.

Link copied to clipboard
suspend fun respond(builder: suspend ResponseContext.ResponseBuilder.() -> Unit)

Responds to the interaction with a channel message

Link copied to clipboard
open suspend override fun Message.respond(message: String): Message

Send a message in the same channel as this message.

open suspend override fun Message.respond(message: String, block: Embed.() -> Unit): Message

Send an embed in the same channel as this message.

Link copied to clipboard
open suspend override fun Message.respondAndDelete(message: String): Message
open suspend override fun Message.respondAndDelete(message: String, block: Embed.() -> Unit): Message

Send a message in the same channel as this message and delete the original message.

Link copied to clipboard
open suspend override fun Message.respondEmbed(message: String, block: Embed.() -> Unit): Message

Send an embed in the same channel as this message.

Link copied to clipboard
open override fun webhook(webhookId: String): WebhookClient

Create an instance of a webhook client