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

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

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