GuildUserCommandContext

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

Constructors

GuildUserCommandContext
Link copied to clipboard
fun GuildUserCommandContext(event: UserInteractionEvent, scope: CoroutineScope)

Functions

getChannel
Link copied to clipboard
open suspend override fun getChannel(): GuildMessageChannel

The channel that this command was used in.

getGuild
Link copied to clipboard
open suspend override fun getGuild(): Guild

The server that this command was used in.

getTargetUser
Link copied to clipboard
open suspend override fun getTargetUser(): Member
open suspend override fun getTargetUser(retrievalStrategy: EntityRetrievalStrategy): Member

Properties

channelId
Link copied to clipboard
val channelId: Snowflake

The ID of the channel where this command was used.

client
Link copied to clipboard
val client: GatewayDiscordClient

The gateway this event was dispatched from.

coroutineContext
Link copied to clipboard
open override val coroutineContext: CoroutineContext
event
Link copied to clipboard
override val event: UserInteractionEvent

The discord interaction event.

guildId
Link copied to clipboard
open override val guildId: Snowflake

The ID of the server that this command was used in.

interaction
Link copied to clipboard
val interaction: Interaction

The discord interaction for this command context.

interactionResponse
Link copied to clipboard
val interactionResponse: GatewayInteractionResponse

The interaction followup handler.

member
Link copied to clipboard
open override val member: Member

The user as a Member that invoked this command.

targetId
Link copied to clipboard
val targetId: Snowflake
user
Link copied to clipboard
val user: User

The user that invoked this command.

Sources

jvm source
Link copied to clipboard