commonMain.cache.data.MessageInteractionData.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.DiscordMessageInteraction
import dev.kord.common.entity.InteractionType
import dev.kord.common.entity.Snowflake
import kotlinx.serialization.Serializable
@Serializable
public data class MessageInteractionData(
val id: Snowflake,
val type: InteractionType,
val name: String,
val user: Snowflake
) {
public companion object {
public fun from(entity: DiscordMessageInteraction): MessageInteractionData = with(entity) {
MessageInteractionData(id, type, name, user.id)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy