All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.entity.Region.kt Maven / Gradle / Ivy

There is a newer version: 0.15.0
Show newest version
package dev.kord.core.entity

import dev.kord.core.Kord
import dev.kord.core.KordObject
import dev.kord.core.cache.data.RegionData
import dev.kord.core.hash

public class Region(public val data: RegionData, override val kord: Kord) : KordObject {
    public val id: String
        get() = data.id

    public val isCustom: Boolean get() = data.custom

    public val isDeprecated: Boolean get() = data.deprecated

    public val name: String get() = data.name

    public val isOptimal: Boolean get() = data.optimal

    override fun hashCode(): Int = hash(id)

    override fun equals(other: Any?): Boolean = when (other) {
        is Region -> other.id == id
        else -> false
    }

    override fun toString(): String {
        return "Region(data=$data, kord=$kord)"
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy