Package-level declarations

Types

Link copied to clipboard
abstract class AbstractLiveKordEntity(val kord: Kord, coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job)) : LiveKordEntity, CoroutineScope
Link copied to clipboard
class LiveGuild(guild: Guild, coroutineScope: CoroutineScope = guild.kord + SupervisorJob(guild.kord.coroutineContext.job)) : AbstractLiveKordEntity, KordEntity
Link copied to clipboard

A Discord entity that only emits events related to this entity.

Link copied to clipboard
class LiveMember(member: Member, coroutineScope: CoroutineScope = member.kord + SupervisorJob(member.kord.coroutineContext.job)) : AbstractLiveKordEntity, KordEntity
Link copied to clipboard
class LiveMessage(message: Message, val guildId: Snowflake?, coroutineScope: CoroutineScope = message.kord + SupervisorJob(message.kord.coroutineContext.job)) : AbstractLiveKordEntity, KordEntity
Link copied to clipboard
class LiveRole(role: Role, coroutineScope: CoroutineScope = role.kord + SupervisorJob(role.kord.coroutineContext.job)) : AbstractLiveKordEntity, KordEntity
Link copied to clipboard
class LiveUser(user: User, coroutineScope: CoroutineScope = user.kord + SupervisorJob(user.kord.coroutineContext.job)) : AbstractLiveKordEntity, KordEntity

Functions

Link copied to clipboard
fun Guild.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job)): LiveGuild
fun Member.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job)): LiveMember
suspend fun Message.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job)): LiveMessage
fun Role.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job)): LiveRole
fun User.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job)): LiveUser
inline fun Guild.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job), block: LiveGuild.() -> Unit): LiveGuild
inline fun Member.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job), block: LiveMember.() -> Unit): LiveMember
suspend fun Message.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job), block: LiveMessage.() -> Unit): LiveMessage
inline fun Role.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job), block: LiveRole.() -> Unit): LiveRole
inline fun User.live(coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job), block: LiveUser.() -> Unit): LiveUser
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 LiveGuild.onBanAdd(scope: CoroutineScope = this, block: suspend (BanAddEvent) -> Unit): Job
Link copied to clipboard
fun LiveGuild.onBanRemove(scope: CoroutineScope = this, block: suspend (BanRemoveEvent) -> Unit): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun LiveGuild.onGuildCreate(scope: CoroutineScope = this, block: suspend (GuildCreateEvent) -> Unit): Job
Link copied to clipboard
fun LiveGuild.onGuildUpdate(scope: CoroutineScope = this, block: suspend (GuildUpdateEvent) -> Unit): Job
Link copied to clipboard
Link copied to clipboard
fun LiveGuild.onMemberJoin(scope: CoroutineScope = this, block: suspend (MemberJoinEvent) -> Unit): Job
Link copied to clipboard
fun LiveGuild.onMemberLeave(scope: CoroutineScope = this, block: suspend (MemberLeaveEvent) -> Unit): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun LiveGuild.onReactionAdd(scope: CoroutineScope = this, block: suspend (ReactionAddEvent) -> Unit): Job
inline fun LiveGuild.onReactionAdd(reaction: ReactionEmoji, scope: CoroutineScope = this, crossinline block: suspend (ReactionAddEvent) -> Unit): Job
inline fun LiveMessage.onReactionAdd(reaction: ReactionEmoji, scope: CoroutineScope = this, crossinline block: suspend (ReactionAddEvent) -> Unit): Job
Link copied to clipboard
inline fun LiveGuild.onReactionRemove(reaction: ReactionEmoji, scope: CoroutineScope = this, crossinline block: suspend (ReactionRemoveEvent) -> Unit): Job
inline fun LiveMessage.onReactionRemove(reaction: ReactionEmoji, scope: CoroutineScope = this, crossinline block: suspend (ReactionRemoveEvent) -> Unit): Job
Link copied to clipboard
fun LiveGuild.onRoleCreate(scope: CoroutineScope = this, block: suspend (RoleCreateEvent) -> Unit): Job
Link copied to clipboard
fun LiveGuild.onRoleDelete(scope: CoroutineScope = this, block: suspend (RoleDeleteEvent) -> Unit): Job
Link copied to clipboard
fun LiveGuild.onRoleUpdate(scope: CoroutineScope = this, block: suspend (RoleUpdateEvent) -> Unit): Job
Link copied to clipboard
fun LiveMember.onUpdate(scope: CoroutineScope = this, block: suspend (MemberUpdateEvent) -> Unit): Job
fun LiveMessage.onUpdate(scope: CoroutineScope = this, block: suspend (MessageUpdateEvent) -> Unit): Job
fun LiveRole.onUpdate(scope: CoroutineScope = this, block: suspend (RoleUpdateEvent) -> Unit): Job
fun LiveUser.onUpdate(scope: CoroutineScope = this, block: suspend (UserUpdateEvent) -> Unit): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard