commonMain.cache.data.ClientStatusData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kord-core Show documentation
Show all versions of kord-core Show documentation
Idiomatic Kotlin Wrapper for The Discord API
package dev.kord.core.cache.data
import dev.kord.common.entity.DiscordClientStatus
import dev.kord.common.entity.PresenceStatus
import dev.kord.common.entity.optional.Optional
import kotlinx.serialization.Serializable
@Serializable
public data class ClientStatusData(
val desktop: Optional = Optional.Missing(),
val mobile: Optional = Optional.Missing(),
val web: Optional = Optional.Missing()
) {
public companion object {
public fun from(entity: DiscordClientStatus): ClientStatusData = with(entity) {
ClientStatusData(desktop, mobile, web)
}
}
}