commonMain.cache.data.GuildApplicationCommandPermissionsData.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
The newest version!
package dev.kord.core.cache.data
import dev.kord.cache.api.data.DataDescription
import dev.kord.cache.api.data.description
import dev.kord.common.entity.DiscordGuildApplicationCommandPermissions
import dev.kord.common.entity.Snowflake
public data class GuildApplicationCommandPermissionsData(
val id: Snowflake,
val applicationId: Snowflake,
val guildId: Snowflake,
val permissions: List
) {
public companion object {
public val description: DataDescription =
description(GuildApplicationCommandPermissionsData::id)
public fun from(permissions: DiscordGuildApplicationCommandPermissions): GuildApplicationCommandPermissionsData =
with(permissions) {
GuildApplicationCommandPermissionsData(
id,
applicationId,
guildId,
this.permissions.map(GuildApplicationCommandPermissionData::from)
)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy