LiveUser

class LiveUser(user: User, coroutineScope: CoroutineScope = user.kord + SupervisorJob(user.kord.coroutineContext.job)) : AbstractLiveKordEntity, KordEntity(source)

Constructors

Link copied to clipboard
constructor(user: User, coroutineScope: CoroutineScope = user.kord + SupervisorJob(user.kord.coroutineContext.job))

Properties

Link copied to clipboard
Link copied to clipboard
override val events: SharedFlow<Event>
Link copied to clipboard
open override val id: Snowflake

The unique identifier of this entity.

Link copied to clipboard
override val kord: Kord

The kord instance that created this object.

Link copied to clipboard
var user: User

Functions

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

Compares entities on id.

Link copied to clipboard
inline fun <T : Event> LiveKordEntity.on(scope: CoroutineScope = this, noinline consumer: suspend (T) -> Unit): Job

Convenience method that will invoke the consumer on every event T, the consumer is launched in the given scope or Kord by default and will not propagate any exceptions.

Link copied to clipboard
fun LiveUser.onUpdate(scope: CoroutineScope = this, block: suspend (UserUpdateEvent) -> Unit): Job
Link copied to clipboard
open override fun shutDown(cause: CancellationException)