PresenceUpdateEvent

class PresenceUpdateEvent(val oldUser: User?, val user: DiscordPresenceUser, val guildId: Snowflake, val old: Presence?, val presence: Presence, val shard: Int, val customContext: Any?, val supplier: EntitySupplier = presence.kord.defaultSupplier) : Event, Strategizable(source)

Constructors

Link copied to clipboard
constructor(oldUser: User?, user: DiscordPresenceUser, guildId: Snowflake, old: Presence?, presence: Presence, shard: Int, customContext: Any?, supplier: EntitySupplier = presence.kord.defaultSupplier)

Properties

Link copied to clipboard
open override val customContext: Any?

A custom object that can be inserted when creating events. By default, this is just null.

Link copied to clipboard
open val gateway: Gateway

The Gateway that spawned this event.

Link copied to clipboard

The behavior of the guild in which the presence was updated.

Link copied to clipboard
Link copied to clipboard
open override val kord: Kord

The kord instance that created this object.

Link copied to clipboard

The behavior of the member whose presence was updated.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val shard: Int

The shard number of the gateway that spawned this event.

Link copied to clipboard
open override val supplier: EntitySupplier

The supplier used to request entities.

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun getGuild(): Guild

Requests to get the guild in which the presence was updated.

Link copied to clipboard
suspend fun getGuildOrNull(): Guild?

Requests to get the guild in which the presence was updated, returns null if the guild isn't present.

Link copied to clipboard
suspend fun getMember(): Member

Requests to get the member whose presence was updated.

Link copied to clipboard
suspend fun getMemberOrNull(): Member?

Requests to get the member whose presence was updated, returns null if the member isn't present.

Link copied to clipboard
suspend fun getUser(): User

Requests to get the user whose presence was updated.

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

Requests to get the user whose presence was updated, returns null if the user isn't present.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun withStrategy(strategy: EntitySupplyStrategy<*>): PresenceUpdateEvent

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