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

commonMain.cache.data.GuildApplicationCommandPermissionData.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.ApplicationCommandPermissionType
import dev.kord.common.entity.DiscordGuildApplicationCommandPermission
import dev.kord.common.entity.Snowflake

public data class GuildApplicationCommandPermissionData(
    val id: Snowflake,
    val type: ApplicationCommandPermissionType,
    val permission: Boolean
) {
    public companion object {
        public fun from(permission: DiscordGuildApplicationCommandPermission): GuildApplicationCommandPermissionData =
            with(permission) {
                GuildApplicationCommandPermissionData(id, type, this.permission)
            }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy