commonMain.cache.data.MessageReferenceData.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.DiscordMessageReference
import dev.kord.common.entity.optional.OptionalSnowflake
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
public data class MessageReferenceData(
@SerialName("message_id")
val id: OptionalSnowflake = OptionalSnowflake.Missing,
@SerialName("channel_id")
val channelId: OptionalSnowflake = OptionalSnowflake.Missing,
@SerialName("guild_id")
val guildId: OptionalSnowflake = OptionalSnowflake.Missing,
) {
public companion object {
public fun from(entity: DiscordMessageReference): MessageReferenceData = with(entity) {
return MessageReferenceData(id, channelId, guildId)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy