commonMain.cache.data.RegionData.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
The newest version!
package dev.kord.core.cache.data
import dev.kord.common.entity.DiscordVoiceRegion
import dev.kord.common.entity.optional.OptionalSnowflake
import kotlinx.serialization.Serializable
@Serializable
public data class RegionData(
val id: String,
val guildId: OptionalSnowflake = OptionalSnowflake.Missing,
val name: String,
val optimal: Boolean,
val deprecated: Boolean,
val custom: Boolean,
) {
public companion object {
public fun from(guildId: OptionalSnowflake, region: DiscordVoiceRegion): RegionData = with(region) {
RegionData(id, guildId, name, optimal, deprecated, custom)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy