Interaction

class Interaction(val data: MessageInteractionData, val kord: Kord, val supplier: EntitySupplier = kord.defaultSupplier) : KordEntity, Strategizable(source)

An instance of MessageInteraction

This is sent on the Message object when the message is a response to an ActionInteraction.

Constructors

Link copied to clipboard
constructor(data: MessageInteractionData, kord: Kord, supplier: EntitySupplier = kord.defaultSupplier)

Properties

Link copied to clipboard
Link copied to clipboard
open override val id: Snowflake

Id of the ActionInteraction this message is responding to.

Link copied to clipboard
open override val kord: Kord

The kord instance that created this object.

Link copied to clipboard

The name of the ApplicationCommand that triggered this message. This name includes subcommands and subcommand groups.

Link copied to clipboard
open override val supplier: EntitySupplier

The supplier used to request entities.

Link copied to clipboard

The InteractionType of the interaction Interaction.

Link copied to clipboard

The UserBehavior of the user who invoked the ActionInteraction.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Entity): Int

Compares entities on id.

Link copied to clipboard
suspend fun getUser(): User

Requests the User of this interaction message.

Link copied to clipboard
suspend fun getUserOrNull(): User?

Requests to get the user of this interaction message, returns null if the User isn't present.

Link copied to clipboard
open override fun withStrategy(strategy: EntitySupplyStrategy<*>): Message.Interaction

Returns a copy of this class with a new supplier provided by the strategy.