commonMain.cache.data.ThreadMembersUpdateEventData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kord-core-jvm Show documentation
Show all versions of kord-core-jvm Show documentation
Idiomatic Kotlin Wrapper for The Discord API
package dev.kord.core.cache.data
import dev.kord.common.entity.Snowflake
import dev.kord.common.entity.optional.Optional
import dev.kord.common.entity.optional.mapList
import dev.kord.gateway.ThreadMembersUpdate
public class ThreadMembersUpdateEventData(
public val id: Snowflake,
public val guildId: Snowflake,
public val memberCount: Int,
public val addedMembers: Optional> = Optional.Missing(),
public val removedMemberIds: Optional> = Optional.Missing()
) {
public companion object {
public fun from(event: ThreadMembersUpdate): ThreadMembersUpdateEventData = with(event.members) {
ThreadMembersUpdateEventData(
id,
guildId,
memberCount,
addedMembers.mapList { ThreadMemberData.from(it) },
removedMemberIds
)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy