commonMain.cache.data.BanData.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.Snowflake
import dev.kord.rest.json.response.BanResponse
import kotlinx.serialization.Serializable
@Serializable
public data class BanData(
val reason: String? = null,
val userId: Snowflake,
val guildId: Snowflake,
) {
public companion object {
public fun from(guildId: Snowflake, entity: BanResponse): BanData = with(entity) {
BanData(reason, user.id, guildId)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy