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

commonMain.cache.data.PermissionOverwriteData.kt Maven / Gradle / Ivy

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

import dev.kord.common.entity.Overwrite
import dev.kord.common.entity.*
import kotlinx.serialization.Serializable

@Serializable
public data class PermissionOverwriteData(
    val id: Snowflake,
    val type: OverwriteType,
    val allowed: Permissions,
    val denied: Permissions
) {
    public companion object {
        public fun from(entity: Overwrite): PermissionOverwriteData = with(entity) {
            PermissionOverwriteData(id, type, allow, deny)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy