GuildSlashCommandContext

open class GuildSlashCommandContext(val client: SlashCommandClient, val event: SlashCommandInteractionEvent, val function: KFunction<*>) : SlashCommandContext

Constructors

Link copied to clipboard
constructor(client: SlashCommandClient, event: SlashCommandInteractionEvent, function: KFunction<*>)

Properties

Link copied to clipboard
open override val channel: GuildMessageChannel
Link copied to clipboard
open override val client: SlashCommandClient
Link copied to clipboard
open override val event: SlashCommandInteractionEvent
Link copied to clipboard

A map where you can define anything

Link copied to clipboard
open override val function: KFunction<*>
Link copied to clipboard
open override val guild: Guild
Link copied to clipboard
val hook: InteractionHook
Link copied to clipboard
open override val interaction: CommandInteraction
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val member: Member
Link copied to clipboard
val options: List<OptionMapping>
Link copied to clipboard
val selfMember: Member
Link copied to clipboard
val user: User

Functions

Link copied to clipboard
open suspend override fun acknowledge(ephemeral: Boolean)

Automatically detect if the interaction is already acknowledge and if not will acknowledge it.

Link copied to clipboard
open suspend fun acknowledgeAsync(ephemeral: Boolean): Deferred<Unit>
Link copied to clipboard
inline suspend fun <E : GenericEvent> InteractionContext<*>.await(timeout: Duration, crossinline filter: suspend (event: E) -> Boolean): E?
Link copied to clipboard
fun embed(builder: EmbedBuilder.() -> Unit): EmbedContextAction

Build a ContextAction using DSL.

Link copied to clipboard
fun getOption(name: String): OptionMapping?
Link copied to clipboard
fun message(builder: MessageCreateBuilder.() -> Unit): MessageContextAction

Build a ContextAction using DSL.

Link copied to clipboard
fun replyEmbed(builder: EmbedBuilder.() -> Unit): ReplyCallbackAction
fun replyEmbed(builder: EmbedBuilder): ReplyCallbackAction
fun replyEmbed(embed: MessageEmbed): ReplyCallbackAction

Reply to the event with the given embed.

Link copied to clipboard
fun replyMessage(builder: MessageCreateBuilder.() -> Unit): ReplyCallbackAction

SReply to the event with the given content.

fun replyMessage(content: String): ReplyCallbackAction
fun replyMessage(message: Message): ReplyCallbackAction
fun replyMessage(builder: MessageCreateBuilder): ReplyCallbackAction

Reply to the event with the given content.

Link copied to clipboard
fun replyModal(customId: String, title: String, builder: Modal.Builder.() -> Unit): ModalCallbackAction
Link copied to clipboard
fun sendEmbed(builder: EmbedBuilder.() -> Unit): WebhookMessageCreateAction<Message>
fun sendEmbed(builder: EmbedBuilder): WebhookMessageCreateAction<Message>
fun sendEmbed(embed: MessageEmbed): WebhookMessageCreateAction<Message>

Send a follow-up message with the given embed.

Link copied to clipboard
fun sendMessage(builder: MessageCreateBuilder.() -> Unit): WebhookMessageCreateAction<Message>
fun sendMessage(content: String): WebhookMessageCreateAction<Message>
fun sendMessage(message: Message): WebhookMessageCreateAction<Message>
fun sendMessage(builder: MessageCreateBuilder): WebhookMessageCreateAction<Message>

Send a follow-up message with the given content.